Hi All
(Please excuse the cross posting)
I've Jenkins and TeamCity running on two separate VMs within my home network. I have another (physical) box running, among other things, Apache 2 (on Ubuntu server) and I have port 80 forwarded from my router to it. I've configured a number of virtual hosts on Apache, which work fine, and have proxies to two other web applications (subsonic & Nexus) running on Tomcat on the same box. What I want to do is add proxies for Jenkins and Tomcat. This is my configuration:
<VirtualHost *:80> ... ProxyRequests Off ProxyPreserveHost On <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass /subsonic/ http://localhost:8080/subsonic/ ProxyPassReverse /subsonic/ http://localhost:8080/subsonic/
ProxyPass /nexus/ http://localhost:8080/nexus/ ProxyPassReverse /nexus/ http://localhost:8080/nexus/
ProxyPass /teamcity/ http://192.168.1.x1:8080/ ProxyPassReverse /teamcity/ http://192.168.1.x1:8080/
ProxyPass /jenkins/ http://192.168.1.15/ ProxyPassReverse /jenkins/ http://192.168.1.x2/ </VirtualHost>
I think the Apache 2 configuration is fine and that the problems reside in the TeamCity and Jenkins configurations. I access them like this:
http://<mydomain>/teamcity/ http://<mydomain>/jenkins/
In the case of TeamCity, it tries to redirect me to login.html, but looses the /teamcity/ part from the URL. In the case of Jenkins, the first obvious issue is that the CSS isn't referenced properly and some of the links don't work.
I've done the obvious stuff like update the server URL for both TeamCity and Jenkins (just like I had to with Nexus). I've restarted everything, even the boxes/VMs. And Iv'e googled. I'm still stuck. Does anyone know what I'm doing wrong?
On 18 Mar 2012, at 10:13, Paul Grenyer wrote:
ProxyPass /jenkins/ http://192.168.1.15/
Should that one not be http://192.168.1.15/jenkins/ ?
I run an apache rewrite on the same box as jenkins, and its config has:
ProxyPass /jenkins/ http://localhost:8080/jenkins/
see https://gist.github.com/2106616
I access that through https://jenkins.mydomain.com/, which redirects to https://jenkins.mydomain.com/jenkins/ In Manage Jenkins -> Configure System, the "Jenkins URL" is set to "https://jenkins.lucidworks.io/jenkins/"
-- Martjn
Hi All
I've actually resolved the Jenkins this issue with the help of the guys from accu-general. If anyone is interested I can summarise.
On 19 Mar 2012, at 11:46, Paul Grenyer wrote:
Hi All
I've actually resolved the Jenkins this issue with the help of the guys from accu-general. If anyone is interested I can summarise.
Always good to have closure to a problem for the mailing list archives.
How did you end up fixing it?
Hi
Always good to have closure to a problem for the mailing list archives.
How did you end up fixing it?
So, this is the response I got from someone on accu-general who has a similar setup:
<VirtualHost *:80> .... <Location /jenkins> ProxyPass http://127.0.0.1:8077/jenkins ProxyPassReverse http://127.0.0.1:8077/jenkins </Location> </VirtualHost>
I pass --prefix=/jenkins as an argument to Jenkins (in my case by adding it to /etc/default/jenkins). In the Jenkins configuration screen I've set the Jenkins URL to http://jezuk.dnsalias.net/jenkins (ie the externally visible URL), although I'm not entirely sure what it does with this information.
And this was my response:
Ok, so this made me look at my configuration more closely. I'm running apache and jenkins on two different VMs. I'd forgotten that on the jenkins VM I was already using apache to forward port 80 to jenkins. So I've now added the prefix and reconfigured apache on the other box to point to the jenkins port, rather than port 80 and all seems to be happy now. Thanks!
Anyone know how to fix the problem with TeamCity?