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 httpS://
)
Jenkins URL
in global configuration. It works fine for everything, except that it always redirects to http://
, despite the URL saying httpS://
jenkins.xml
with port configuration, however as my setup is not using Jenkins Windows service install, I simply don't have jenkins.xml
Is there a different place I can specify the parameters to Jenkins?Jenkins URL
protocol part from Global Configuration.Jenkins.war
renamed to ROOT.war
is placed in Tomcat's webapps
folder bin\tomcat6.exe //RS//Instance_Name
conf\server.xml
8088
, cannot use 443
for SSL as there are multiple instances running and they can't all have 443
as the only way Instances are differentiated is by port.*.mydomain.com
) that is hosted on a load balancer hardware. (I don't have access to actual file) jenkins.mydomain.com
resolves to a virtual IP on the load-balancer, which then forwards to traffic to actual Windows server hosting Jenkins.I suggest peeking around the server.xml and finding the Connector and adding secure="true" if you are doing an HTTP proxy scheme. Redirect ports may also be involved.
<Connector secure="true" port="8088" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000"
/>
For reference, We run Jenkins behind 2 Apache proxies, one external and one internal:
The relevant parts of our external vhost (jenkins.host.com):
RequestHeader unset Authorization
RequestHeader set Authorization "Basic (encrypted password)"
ProxyPass / ajp://dev.internal:9101/
ProxyPassReverse / ajp://dev.internal:9101/
The relevant parts of tomcat's server.xml:
<Connector port="9001" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000"
/>
<Connector port="9101" protocol="AJP/1.3" URIEncoding="UTF-8"/>
<Host name="dev.internal" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Alias>jenkins.host.com</Alias>
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="dev.internal_access_log." suffix=".txt" rotatable="false"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With