nginx authbasic for whole site fails

I have this in my server config

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

When I call my domain or any subfolder, e.g. protection works

but when I call my domain incl. file-name, e.g. I don't need to enter any credentials and can just bypass authbasic.

What did I do wrong here?

Category:php Views:1 Time:2018-03-12

Related post

Copyright (C), All Rights Reserved.

processed in 0.309 (s). 11 q(s)