Issue
I have a standalone Jenkins which can be reached at http://1.2.3.4:8080, and setup a Nginx instance working on 80 port.
Here is my config file for Nginx:
location /jenkins {
proxy_pass http://127.0.0.1:8080/;
}
By visit http://1.2.3.4/jenkins I can reach to Jenkins, but static resources for Jenkins like css, images did not loaded. I can reach these static resources by http://1.2.3.4/jenkins/resource.css ...
How should I correct my Nginx config file to make Jenkins behind Nginx reverse proxy work?
Nginx version: 1.12.2 Jenkins version: jenkins-2.89.1-1.1.noarch.rpm
Solution
I got the answer, I'm using CentOS7, add JENKINS_ARGS="--prefix=/jenkins"
to /etc/sysconfig/jenkins and restart Jenkins worked.
Answered By - xring
Answer Checked By - David Goodson (JavaFixing Volunteer)