Running Jenkins behind NGINX Proxy

I have a Jenkins server with a private IP address and an NGNIX server with a public IP. I wanted to point the domain for the Jenkins server to the NGINX server and the NGINX server would forward the request the Jenkins server.

I got this working through NGINX proxy pass, here is NGNIX configuration that I have used to get it working.

Assume the domain used for Jenkins server is and the IP address of the Jenkins server is running at port 8080.

On the Nginx server we create the file under the sites-available folder, here is the exact path: /etc/nginx/sites-available/

Then linked the file to sites-enabled

sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Test the updated configuration

sudo nginx -t

Restart the nginx server

sudo systemctl restart nginx

That’s it! Let me know if you have any questions or comments.