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?
Subject Author Posted

Location recursive downloads php files

Peleke July 20, 2013 05:01PM

Re: Location recursive downloads php files

Francis Daly July 21, 2013 04:06AM

Re: Location recursive downloads php files

Peleke July 21, 2013 01:08PM

Re: Location recursive downloads php files

Francis Daly July 21, 2013 04:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready