NGINX/JENKINS: It appears that your reverse proxy set up is broken NGINX/JENKINS: It appears that your reverse proxy set up is broken jenkins jenkins

NGINX/JENKINS: It appears that your reverse proxy set up is broken


This is not a NGINX problem.

Inside Jenkins you need to configure the Jenkins URL. If it is not set correctly you will get the error you observed.
Check Jenkins -> Manage Jenkins -> Configure System => Jenkins URL.


For me the URL was correctly configured. I had to changed Nginx configuration to include some extra headers:

server {    listen 443 ssl;        server_name  my-subdomain.main-domain.com; # this is the url domain of the proxy (Load balancer in front of Jenkins)        ssl_certificate /etc/nginx/certs/ssl_certificate.crt;    ssl_certificate_key /etc/nginx/certs/ssl_key.pem;        location / {        proxy_set_header X-Forwarded-Proto https;        proxy_set_header X-Forwarded-Host my-subdomain.main-domain.com; # this is the url domain of the proxy (Load balancer in front of Jenkins)        proxy_pass http://${JENKINS_PRIVATE_IP}:${JENKINS_PORT};    }}


For Linux (Ubuntu) users, please check the /etc/default/jenkins file.

In that file, look for JENKINS_ARGS and copy the httpListenAddress and paste it in your Jenkins URL.

I am using Nginx with Lets Encrypt encryption and my /etc/default/jenkins file is like this JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --httpListenAddress=127.0.0.1"

I think you can also localhost:[your port] or 127.0.0.1:[your port]