title: Jenkins does not redirect to HTTPS
body: <h1>The problem</h1>
  
  <p>I am using Jenkins over <code>HTTPS/SSL</code> (the details of setup below). I can navigate to <code>https://jenkins.mydomain.com:8088</code> without any problems. All links are correct with <code>https://</code> in front of them. I can properly navigate through almost all Jenkins pages.</p>
  
  <p><strong>Except</strong> when Jenkins tries to redirect (e.g after login, after clicking <kbd>Build</kbd>, etc). Whenever Jenkins tries to redirect to any page, it sends me to <code>http://</code> page (not <code>httpS://</code>)</p>
  
  <h1>What I've tried</h1>
  
  <ul>
  <li>I have tried setting setting  <code>Jenkins URL</code> in global configuration. It works fine for everything, except that it always redirects to <code>http://</code>, despite the URL saying <code>httpS://</code>
  <img src="https://i.stack.imgur.com/aiity.png" alt="enter image description here"></li>
  <li>I have tried following <a href="https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache" rel="noreferrer">instructions here</a> regarding modifying <code>jenkins.xml</code> with port configuration, however as my setup is not using Jenkins Windows service install, I simply don't have <code>jenkins.xml</code> Is there a different place I can specify the parameters to Jenkins?</li>
  <li>I have tried understanding whatever <em>"mod_proxy with HTTPS"</em> 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 <code>Jenkins URL</code> protocol part from Global Configuration.</li>
  </ul>
  
  <h2>The Jenkins setup</h2>
  
  <ul>
  <li>Apache Tomcat running as Windows service  
  
  <ol>
  <li><code>Jenkins.war</code> renamed to <code>ROOT.war</code> is placed in Tomcat's <code>webapps</code> folder  </li>
  <li>Executing through <code>bin\tomcat6.exe //RS//Instance_Name</code>  </li>
  <li>Configured through Tomcat's Windows "Monitor Service" tool
  <img src="https://i.stack.imgur.com/mhbqi.png" alt="enter image description here"></li>
  </ol></li>
  <li>There are multiple instances configured this way on this machine, differentiated by different Tomcat folders and different Tomcat ports under respective <code>conf\server.xml</code></li>
  <li>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.</li>
  <li>Jenkins' port <code>8088</code>, cannot use <code>443</code> for SSL as there are multiple instances running and they can't all have <code>443</code> as the only way Instances are differentiated is by port.</li>
  </ul>
  
  <h2>The SSL setup</h2>
  
  <ul>
  <li>We have a global SSL cert (<code>*.mydomain.com</code>) that is hosted on a load balancer hardware.  (I don't have access to actual file)  </li>
  <li>There is no SSL on actual Windows server hosting Jenkins.  </li>
  <li>The DNS for <code>jenkins.mydomain.com</code> resolves to a virtual IP on the load-balancer, which then forwards to traffic to actual Windows server hosting Jenkins.</li>
  <li>There is <strong>nothing wrong</strong> with this setup, it works fine for all other sites. <em>This SSL setup also works fine for our Jenkins instance</em>.</li>
  </ul>