I have a little problem with proxy_pass
and auth_basic
combining in the same location.
I use nginx as reverse-proxy for Bluemap (https://bluemap.bluecolored.de/) I and want to enable http authentification.
My current configuration:
location /map/ {
auth_basic "Restricted Area";
auth_basic_user_file /etc/nginx/auth/htpasswd;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://172.18.0.1:8100/;
}
But with auth_basic
I always getting infinite loading loop for the <domain>/map
page.
htpasswd
file exist.auth_basic
without proxy_pass
.Any ideas?
Google Chrome just has weird behaviour and doesn't show authentication popup until it's been restarted.