Sla*_*lav 10 ssl tomcat hudson jenkins
我正在使用Jenkins HTTPS/SSL
(下面的设置细节).我可以https://jenkins.mydomain.com:8088
毫无问题地导航到.所有链接都https://
在他们面前是正确的.我可以正确浏览几乎所有Jenkins页面.
除了 Jenkins尝试重定向(例如登录后,点击Build后等).每当Jenkins尝试重定向到任何页面时,它都会将我发送到http://
页面(不是httpS://
)
Jenkins URL
在全局配置中设置设置 .它适用于所有内容,但它始终重定向到http://
,尽管URL说httpS://
jenkins.xml
,但是由于我的设置没有使用Jenkins Windows服务安装,我根本没有,jenkins.xml
是否有不同的地方我可以为Jenkins指定参数?Jenkins URL
了全局配置中的协议部分.Jenkins.war
重命名ROOT.war
为放置在Tomcat的webapps
文件夹中 bin\tomcat6.exe //RS//Instance_Name
conf\server.xml
8088
不能443
用于SSL,因为有多个实例正在运行,并且它们不能全部具有443
实例区分的唯一方式是端口.*.mydomain.com
托管在负载均衡器硬件上的全局SSL证书().(我无法访问实际文件) jenkins.mydomain.com
解析为负载均衡器上的虚拟IP,然后转发到托管Jenkins的实际Windows服务器的流量.小智 1
如果您正在执行 HTTP 代理方案,我建议查看 server.xml 并找到连接器并添加 secure="true"。也可能涉及重定向端口。
<Connector secure="true" port="8088" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000"
/>
Run Code Online (Sandbox Code Playgroud)
作为参考,我们在 2 个 Apache 代理(一个外部代理和一个内部代理)后面运行 Jenkins:
我们的外部虚拟主机(jenkins.host.com)的相关部分:
RequestHeader unset Authorization
RequestHeader set Authorization "Basic (encrypted password)"
ProxyPass / ajp://dev.internal:9101/
ProxyPassReverse / ajp://dev.internal:9101/
Run Code Online (Sandbox Code Playgroud)
tomcat的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>
Run Code Online (Sandbox Code Playgroud)