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
Post a Comment