Welcome! Log In Create A New Profile

Advanced

Re: Location recursive downloads php files

July 21, 2013 01:08PM
Okay, it works if I add this:

location ^~ /folder1/admin {
auth_basic "Login";
auth_basic_user_file /var/www/domain.tld/www/folder1/admin/.htpasswd;
location ~ \.php$ {
#limit_req zone=limit burst=5 nodelay;
try_files $uri =404;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors off;
fastcgi_read_timeout 120;
fastcgi_buffers 256 4k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}

##
# Pass PHP-Files To Socket
##

location ~ \.php$ {
#limit_req zone=limit burst=5 nodelay;
try_files $uri =404;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors off;
fastcgi_read_timeout 120;
fastcgi_buffers 256 4k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

But that is redundancy and can be complicated if you have many of those entries and then want to change a .php setting (you have to do it multiple times).
Isn't it possible to make it simpler?
SubjectAuthorPosted

Location recursive downloads php files

PelekeJuly 20, 2013 05:01PM

Re: Location recursive downloads php files

Francis DalyJuly 21, 2013 04:06AM

Re: Location recursive downloads php files

PelekeJuly 21, 2013 01:08PM

Re: Location recursive downloads php files

Francis DalyJuly 21, 2013 04:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready