where to set the context path - jenkins

0 votes

where to set the context path - jenkins

I’m trying to set me Jenkins server to appear at http://myhost/jenkins, It works, but the Jenkins website thinks http://myhost/ is the jenkins/ root. I can't figure out where to set the context path.

Aug 9, 2018 in Jenkins by lina
• 8,220 points
8,194 views

2 answers to this question.

0 votes
Add prefix attribute to /etc/default/jenkins file:

JENKINS_ARGS="--webroot=/var/cache/jenkins/war --prefix=/jenkins --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT

Configure your web server (e.g. - nginx) to redirect /jenkins to localhost:8080;
answered Aug 9, 2018 by Kalgi
• 52,360 points
0 votes

Put this into /etc/apache2/other/jenkins.conf:

ProxyPass         /jenkins  http://localhost:8009/jenkins
ProxyPassReverse  /jenkins  http://localhost:8009/jenkins
ProxyRequests     Off
<Proxy http://localhost:8009/jenkins*>
    Order deny,allow
    Allow from 127.0.0.1
</Proxy>

Then execute these commands:

sudo defaults write /Library/Preferences/org.jenkins-ci httpPort 8009
sudo defaults write /Library/Preferences/org.jenkins-ci prefix /jenkins
sudo launchctl stop org.jenkins-ci
answered Aug 10, 2018 by Nilesh
• 7,050 points

Related Questions In Jenkins

0 votes
<