I'm trying to configure a NginX reverse proxy to Jenkins.
It's an AWS Light Sail machine.
Jenkins is running on port 7172 and I can access it using the public IP of the server.
I have already the NginX running in several sub.domains and working fine.
But for some reason, Jenkins is timing out under a reverse proxy. The following is my configuration in /etc/nginx/sites-available with link to /etc/nginx/sites-enable.
server {
listen 80;
server_name jenkins.domain.com;
location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the "It appears that your reverse proxy set up is broken" error.
proxy_pass http://127.0.0.1:7172;
proxy_read_timeout 90;
# Required for new HTTP-based CLI
proxy_http_version 1.1;
proxy_request_buffering off;
}
}
Not sure what else I can do.
Ubuntu 18LTS. Jenkins 2.233 Nginx: nginx -v
In Jenkins I have configured as Jenkins URL the sub domain i want to use (jenkins.domain.com)
Thanks in advance for any help.
Domain name jenkins.domain.com do not works, but changing to jnks.domain.com apperears to work.