Can auth_basic restrict files in certain folder?
WisdomFusion
nginx-forum at nginx.us
Mon Mar 29 09:40:58 MSD 2010
Hi, Rob
Great thanks for your quick reply. I have tried your suggestion out, and add the following config:
location ~ ^/restrict/
{
auth_basic "STATISTIC";
auth_basic_user_file /usr/local/nginx/conf/pwfornginx
}
location ~ ^/restrict/.*\.php$
{
auth_basic "STATISTIC";
auth_basic_user_file /usr/local/nginx/conf/pwfornginx
}
However, it is still not working. No authorization is required when I try to get access to a certain page in the restricted folder.
V/R,
gavin
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,68890,68928#msg-68928
More information about the nginx
mailing list