php fastcgi main/common config

Reinis Rozitis r at
Thu Oct 14 13:45:13 MSD 2010

> Obviously $MACRO_TO_REAL_PATH is not exists yet. The question is the
> second configuration is possible with nginx 0.8.52 or not? Or might is
> there any simple solution instead of lot of fastcgi stuff?

You can always use (in  the fastcgi_params file):

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;

At least it works for me so the .php location handler is just simple:

        location ~ \.php$ {
                fastcgi_index  index.php;
                include        fastcgi_params;

Of course it needs to be within each server {} block as there are no global 
location within http {} scope.



More information about the nginx mailing list