Welcome! Log In Create A New Profile

Advanced

SOLVED: securing access to a folder - 404 error

April 04, 2013 08:54AM
This is what was done to solve the problem. I am providing the two relevant location blocks.

# protect the "secure" folder ( /var/www/html/secure )
location /secure/ {
auth_basic "Restricted";
auth_basic_user_file /var/www/protected/.htpasswd;
}

# This is required to protect individual files inside the directory
location ~ ^/secure/.*\.php$ {
auth_basic "Restricted Area";
auth_basic_user_file /var/www/protected/.htpasswd;
fastcgi_pass 127.0.0.1:9010;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
SubjectAuthorPosted

securing access to a folder - 404 error

mottwscMarch 10, 2013 04:07PM

Re: securing access to a folder - 404 error

Francis DalyMarch 18, 2013 05:52PM

Re: securing access to a folder - 404 error

mottwscMarch 18, 2013 08:10PM

Re: securing access to a folder - 404 error

Francis DalyMarch 19, 2013 05:12AM

SOLVED: securing access to a folder - 404 error

mottwscApril 04, 2013 08:54AM

Re: SOLVED: securing access to a folder - 404 error

ShohrehNovember 21, 2013 09:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 156 on March 20, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready