Jenkins is working properly itself but in conjunction with proxy server it fails for specific URLs. These URLs don’t have trailing slash and they are failing only when I’m using HTTPS proxy server (Apache). When accessing Jenkins with bypass of proxy server, there’s no any problem.
I have 2 servers. Server 1 is a proxy server (Apache) which delivers HTTPS connection with external world. Server 2 is a Jenkins server. When accessing Jenkins with domain name it firstly goes thru Server 1, then redirects HTTP to HTTPS and then accesses Server 2. In that model, some of URLs are not working because of lack of trailing slash. When accessing Server 2 directly with its IP address, there is no any problem with URLs.
2
Answers
Many people (including me) are experiencing this. It’s endlessly annoying, but on the jenkins bugtracker they either say it doesn’t exist (anymore) or give workarounds. https://issues.jenkins-ci.org/browse/JENKINS-53434
If you are using a reverse proxy you have to make sure you are using the /jenkins prefix in the url.
You can set it on ubuntu in the file /etc/default/jenkins
Here is my truncated apache config with the proxy config for a https port on 8079
Then in https://website.eu:8079/jenkins/config update the jenkins url
https://website.eu:8079/jenkins