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;
}
Subject Author Posted

securing access to a folder - 404 error

mottwsc March 10, 2013 04:07PM

Re: securing access to a folder - 404 error

Francis Daly March 18, 2013 05:52PM

Re: securing access to a folder - 404 error

mottwsc March 18, 2013 08:10PM

Re: securing access to a folder - 404 error

Francis Daly March 19, 2013 05:12AM

SOLVED: securing access to a folder - 404 error

mottwsc April 04, 2013 08:54AM

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

Shohreh November 21, 2013 09:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
Record Number of Users: 6 on August 08, 2016
Record Number of Guests: 386 on August 02, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready