Global PHP Rule

Michael Shadle mike503 at gmail.com
Mon May 4 04:40:51 MSD 2009


On Sun, May 3, 2009 at 5:06 PM, Mathew Davies
<thepixeldeveloper at googlemail.com> wrote:

> location ~ \.php$
> {
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> include fastcgi_params;
> }
> }

You can put these in fastcgi_params:

fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Also you can put all the fastcgi_params globally on the http {} block.

I have done that, and it works well, there is some random situation
though where if I try to override a fastcgi_param somewhere else, all
of them get unset.





More information about the nginx mailing list