php - nginx authbasic for whole site fails -


i have in server config

location / {              try_files $uri $uri/ =404;             auth_basic  "protected";             auth_basic_user_file  /etc/nginx/.htpasswd;     } 

when call domain or subfolder, e.g. http://example.com/folder/ protection works

but when call domain incl. file-name, e.g. http://example.com/index.php don't need enter credentials , can bypass authbasic.

what did wrong here?


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -