Welcome! Log In Create A New Profile

Advanced

Location recursive downloads php files

July 20, 2013 05:01PM
I try to secure a specific folder and all files and subfolders with this location block:

location ^~ /folder1/admin {
auth_basic "Login";
auth_basic_user_file /var/www/domain.tld/www/folder1/admin/.htpasswd;
}

With this code nginx offers always to download the php files.

With this code everything works as expected except that files and subfolders are not secured:

location /folder1/admin {
auth_basic "Login";
auth_basic_user_file /var/www/domain.tld/www/folder1/admin/.htpasswd;
}

Why is that and how can I fix the problem from the first block?

Thanks.
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: 82
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 184 on July 08, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready