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.