Jenkins does not redirect to HTTPS
|May 16, 2014||Posted by forumadmin under TechQns||
I am using Jenkins over
HTTPS/SSL (the details of setup below). I can navigate to
https://jenkins.mydomain.com:8088 without any problems. All links are correct with
https:// in front of them. I can properly navigate through almost all Jenkins pages.
Except when Jenkins tries to redirect (e.g after login, after clicking Build, etc). Whenever Jenkins tries to redirect to any page, it sends me to
http:// page (not
What I’ve tried
- I have tried setting setting
Jenkins URLin global configuration. It works fine for everything, except that it always redirects to
http://, despite the URL saying
- I have tried following instructions here regarding modifying
jenkins.xmlwith port configuration, however as my setup is not using Jenkins Windows service install, I simply don’t have
jenkins.xmlIs there a different place I can specify the parameters to Jenkins?
- I have tried understanding whatever “mod_proxy with HTTPS” means, but I don’t have any virtual hosts configuration. And besides, my Tomcat installation is not the one that handles SSL. The issue seems to be only in Jenkins’s redirect mechanism, which is ignoring
Jenkins URLprotocol part from Global Configuration.
The Jenkins setup
- Apache Tomcat running as Windows service
ROOT.waris placed in Tomcat’s
- Executing through
- Configured through Tomcat’s Windows “Monitor Service” tool
- There are multiple instances configured this way on this machine, differentiated by different Tomcat folders and different Tomcat ports under respective
- I’ve inherited this setup. Don’t know why they didn’t use the native install package with Windows service. There are multiple instances of Jenkins (through multiple instances of Tomcat service) on this computer. Trying to change the installation type for all those instances will incur unacceptable amount of downtime.
- Jenkins’ port
8088, cannot use
443for SSL as there are multiple instances running and they can’t all have
443as the only way Instances are differentiated is by port.
The SSL setup
- We have a global SSL cert (
*.mydomain.com) that is hosted on a load balancer hardware. (I don’t have access to actual file)
- There is no SSL on actual Windows server hosting Jenkins.
- The DNS for
jenkins.mydomain.comresolves to a virtual IP on the load-balancer, which then forwards to traffic to actual Windows server hosting Jenkins.
- There is nothing wrong with this setup, it works fine for all other sites. This SSL setup also works fine for our Jenkins instance.
|Asked By – Slav||Read Answers|