minimal fastcgi config for 1 file?

António P. P. Almeida appa at perusio.net
Thu Feb 13 13:59:43 UTC 2014


If you want to run Piwik in a subdirectory of the webroot, then check this
post
on how to run Piwik and Drupal together.

The idea is the same for running Piwik with any other PHP based application.

https://groups.drupal.org/node/407348#comment-1012438

----appa



On Thu, Feb 13, 2014 at 2:50 PM, Grant <emailgrant at gmail.com> wrote:

> >> Is it OK to use a minimal fastcgi configuration for a single file like
> this:
> >>
> >> location ~ ^/piwik/piwik.php$ {
> >
> > It doesn't make sense to use regular expression here.  Instead,
> > use exact match location:
> >
> >     location = /piwik/piwik.php {
>
> I'm only using one instance of location = or ^~ and that is on a very
> frequently used location.  Should I keep it that way for performance?
> The idea is that nginx won't have to evaluate all of the other
> locations when the frequently used location is accessed.
>
> >>     fastcgi_pass unix:/run/php-fpm.socket;
> >>     include fastcgi_params;
> >
> > The "fastcgi_params" file as shipped with nginx doesn't set the
> > SCRIPT_FILENAME parameter, and php will likely unable to handle
> > such a request.  Use "include fastcgi.conf;" instead if you don't
> > need SCRIPT_FILENAME customization.
>
> I noticed my distro doesn't include any of the following in
> fastcgi_params and only the first of these in fastcgi.conf:
>
> SCRIPT_FILENAME
> PATH_INFO
> PATH_TRANSLATED
>
> They are all included in fastcgi_params in the example here:
>
> http://wiki.nginx.org/PHPFcgiExample
>
> Should they all be added to fastcgi_params?
>
> - Grant
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140213/0b7dc642/attachment.html>


More information about the nginx mailing list