Need To Run Multiple Location Blocks
justin
nginx-forum at nginx.us
Tue Jul 17 03:42:57 UTC 2012
I have the following location blocks:
location ^~ /publish {
allow 127.0.0.1;
#Allow home
allow 99.100.101.102;
deny all;
}
Then the following location block to process PHP after:
location ~\.php {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
}
The problem is that a request to /publish/execute.php is only hitting
the first location block, and not hitting the fastcgi PHP execution
location block. How can I make the publish location block also check for
PHP files and if so, execute them according to the second location
block?
Thanks.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,228624,228624#msg-228624
More information about the nginx
mailing list