Welcome! Log In Create A New Profile

Advanced

Need To Run Multiple Location Blocks

Anonymous User
July 16, 2012 11:42PM
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.
Subject Author Posted

Need To Run Multiple Location Blocks

Anonymous User July 16, 2012 11:42PM

Re: Need To Run Multiple Location Blocks

Edho Arief July 17, 2012 04:32AM

Re: Need To Run Multiple Location Blocks

Anonymous User July 17, 2012 06:31PM

Re: Need To Run Multiple Location Blocks

Anonymous User July 17, 2012 07:12PM

Re: Need To Run Multiple Location Blocks

Edho Arief July 17, 2012 09:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 262
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready