2 years ago
#47104
ashok
Run jenkins behind nginx
i want to run jenkins behind nginx tried following step
location /jenkins {
rewrite ^/jenkins(.*) $1 break;
proxy_set_header Host $http_host;
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;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $http_host;
proxy_pass http://localhost:8000/jenkins;
}
with localhost:8000 and localhost:8000/jenkins tried both
JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --prefix=$PREFIX --httpListenAddress=127.0.0.1"
jenkins port changed to 8000 ... but getting 500 server error
if i don't add this line "rewrite ^/jenkins(.*) $1 break;" then getting 404 server error
sudo netstat -tulpn --- saw there on 8000 program is running
i want "location /jenkins" not "location /"
java
jenkins
nginx-location
0 Answers
Your Answer