Global PHP Rule

Mathew Davies thepixeldeveloper at googlemail.com
Mon May 4 04:06:14 MSD 2009


Hi,
Is there a way to specify a global PHP location rule? As you can see below,
the PHP block is repeated which is no good.

# domain1.tld
server
{
server_name domain1.tld;
root html/domain1;

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;
}
}

# domain2.tld
server
{
server_name domain2.tld;
root html/domain2;

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;
}
}
Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090504/1cd3494f/attachment.html>


More information about the nginx mailing list