Combining Basic Authentication with Access Restriction by IP Address and auth_basic off
basti
mailinglist at unix-solution.de
Wed Jun 27 13:08:50 UTC 2018
Hello,
I have a config like:
server {
...
# combine basic auth and ip whitelisting
#
https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/
satisfy any;
allow <my_static_IP>;
deny all;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/nx4/.htpasswd;
location /.well-known/acme-challenge/ {
auth_basic off;
default_type "text/plain";
alias /var/lib/dehydrated/acme-challenges/;
}
}
But it seems not working.
Access from allowed ip is fine, from all other get
2018/06/27 14:54:12 [error] 1333#1333: *11176 access forbidden by rule,
client: ...
nginx -v
nginx version: nginx/1.10.3
Can anyone confirm this?
Best regards
More information about the nginx
mailing list