Reputation: 4777
I am running Jenkins on my own web-server (Ubuntu with Apache2) that is accessible via dyndns. My goal is to reach Jenkins by using the following URL:
https://myPrivateURL.dyndns-office.com:444/jenkins/
So I configured my Apache like this:
This makes Jenkins accessible if I enter https://myPrivateURL.dyndns-office.com:444/jenkins/ within my browser. However, not all links within the Jenkins-pages are correct. E.g. consider the menu entries to the left including “New Job”, “Manage Jenkins” etc:
When clicking on “Manage Jenkins” the server tries to find the following URL:
https://myPrivateURL.dyndns-office.com:444/manage
However, the URL should include “jenkins” within the path. The following URL would be the right one (and works if manually entered)
https://myPrivateURL.dyndns-office.com:444/jenkins/manage
So here comes the question:
How do I configure Jenkins so that a prefix is used to build the Jenkins-URLs? Here is what I tried:
I opened /etc/default/jenkins and appended “--prefix=/jenkins/” to JENKINS_ARGS
However, if I try to open https://myPrivateURL.dyndns-office.com:444/jenkins/ after restarting Jenkins I always get the same error message:
It does not matter what I enter as a prefix. Even if I use “abcdefg” as the prefix the error message remains the same. /var/log/jenkins/jenkins.log simply says
[Winstone 2014/01/02 XX:XX:XX] - Request URL / not found - doesn't match any webapp prefix
Upvotes: 4
Views: 6307
Reputation: 4777
I was close:
ProxyPass /jenkins/ http://localhost:8080/
ProxyPassReverse /jenkins/ http://localhost:8080/
has to be
ProxyPass /jenkins/ http://localhost:8080/jenkins/
ProxyPassReverse /jenkins/ http://localhost:8080/jenkins/
Upvotes: 4