Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

auth_basic with proxy_pass problem

$
0
0
Hello,

I have strange behavior when I try to use auth_basic with proxy_pass.

Basically need to do auth_basic by Nginx and if it is passed proxy_pass to RabbitMQ management console.

Browser is asking for credentials on every request, every file js, css, png etc.... when I pass valid data, single resource is downloaded.

Is there any way so it asks first time and then remembers it?

My config looks like:

upstream rabbitmq {
server 127.0.0.1:15672;
}

server {
server_name rabbitmq.example.com;
location / {
auth_basic "restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Set-Cookie;
proxy_read_timeout 600;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://rabbitmq/;
}
}

Thanks for help,

Maciej

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>