我试图让jenkins(on /),sonar(on / sonar)和nexus(on / nexus)启动并运行。 他们似乎工作,除了jenkins给我的老似乎你的反向代理设置是打破。
我不明白为什么。 我错过了一些东西,盯着它太久了。 我做错了什么/失踪?
我的apacheconfiguration如下。 我添加了最后2到proxyPassReverse行,看看是否可以解决这个问题,就像另一个post所build议的那样,但是这对我没有任何作用。
地址的“build”条目在我的主机文件中configuration。
编辑:添加虚拟主机标签
<VirtualHost *> ProxyRequests Off ProxyPreserveHost On AllowEncodedSlashes NoDecode RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443" ProxyPass /sonar http://build:9000/sonar nocanon ProxyPassReverse /sonar http://build:9000/sonar ProxyRequests Off ProxyPass /nexus http://build:8081/nexus nocanon ProxyPassReverse /nexus http://build:8081/nexus ProxyRequests Off ProxyPass / http://build:8080/ nocanon ProxyPassReverse / http://build:8080/ ProxyPassReverse / https://build:8080/ ProxyPassReverse / http://build/ ProxyPassReverse / https://build/ ProxyRequests Off <Proxy http://localhost:8080/*> Order deny,allow Allow from all </Proxy> <Proxy http://localhost:9000/*> Order deny,allow Allow from all </Proxy> <Proxy http://localhost:8081/nexus/*> Order deny,allow Allow from all </Proxy> </VirtualHost>
编辑:添加curl响应:
curl -iL http://192.168.1.108/administrativeMonitor/hudson.diagnosi HTTP/1.1 302 Found Date: Mon, 16 Nov 2015 21:29:00 GMT Server: Jetty(winstone-2.8) X-Content-Type-Options: nosniff Location: https://192.168.1.108/administrativeMonitor/hudson.diagnosis.ReversePr Content-Length: 0 curl: (7) Failed to connect to 192.168.1.108 port 443: Connection refused
编辑:添加apache日志。 (我留下了很多相同的线)
[Mon Nov 16 23:05:42.128539 2015] [proxy:error] [pid 646:tid 140309149226752] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.1.1:8080 (build) failed [Mon Nov 16 23:05:42.128583 2015] [proxy:error] [pid 646:tid 140309149226752] AH00959: ap_proxy_connect_backend disabling worker for (build) for 60s [Mon Nov 16 23:05:42.128593 2015] [proxy_http:error] [pid 646:tid 140309149226752] [client 192.168.1.102:62221] AH01114: HTTP: failed to make connection to backend: build [Mon Nov 16 23:05:42.207801 2015] [proxy:error] [pid 645:tid 140309166012160] AH00940: HTTP: disabled connection for (build) [Mon Nov 16 23:06:31.146140 2015] [proxy:error] [pid 646:tid 140309124048640] AH00940: HTTP: disabled connection for (build) [Mon Nov 16 23:06:31.312161 2015] [proxy:error] [pid 646:tid 140309115655936] AH00940: HTTP: disabled connection for (build) [Tue Nov 17 06:37:41.189136 2015] [mpm_event:notice] [pid 643:tid 140309369055104] AH00493: SIGUSR1 received. Doing graceful restart AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
线索是将Jenkins主页的URLconfiguration为http:// …
这将使jenkins的反向代理testing遵循正确的道路。 当然,如果你想要https,添加s 🙂