Below is my nginx configuration file for Jenkins. Most of them exactly match what I read in the documentation.
Configuration file:
upstream app_server { server 127.0.0.1:8080 fail_timeout=0; } server { listen 80; listen [::]:80 default ipv6only=on; server_name sub.mydomain.net; location ^~ /jenkins/ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (!-f $request_filename) { proxy_pass http://app_server; break; } auth_basic "[....] Please confirm identity..."; auth_basic_user_file /etc/nginx/.htpasswd; }
}
When going to http://sub.mydomain.net/jenkins I will be asked to indicate my main file with the server: [....] Please confirm the identification ...
This is correct, but as soon as I enter the correct credentials, I again get PROMPTED AGAIN for basic auth, but this time: Server says: Jenkins.
Where is this second hidden basic_auth? That makes no sense to me.
By clicking CANCEL at the first prompt, I then correctly get the 401 required authorization .
Pressing CANCEL on the second base auth ("Server says: Jenkins") I get:
HTTP ERROR 401 Problem accessing /jenkins/. Reason: Invalid password/token for user: _____ Powered by Jetty:
Does anyone know what is going on?
source share