Can auth_basic restrict files in certain folder?

WisdomFusion nginx-forum at
Mon Mar 29 06:32:32 MSD 2010

Hi, all

I have some problem with my nginx
I just could not restrict files in certain floder, as follows, i put the settings to nginx.conf

    location ~ ^/restrict/
      auth_basic             "STATISTIC";
      auth_basic_user_file   /usr/local/nginx/conf/pwfornginx

the folder /restrict/ is restricted perfect, however, files in the folder can still be accessed,

What's the matter? any ideas?

Thanks in advance.



Posted at Nginx Forum:,68890,68890#msg-68890

More information about the nginx mailing list