to install jenkins, as the instructions I followed says, I had to create this virtual host:
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName ci.company.com ServerAlias ci ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPreserveHost on ProxyPass / http://localhost:8080/ </VirtualHost>
Now I cannot access anymore to http://localhost/phpmyadmin. It says:
Status Code: 404
Exception: Stacktrace: (none)
What should I do?
Javi
Answer
You’re currently redirecting ANY requests to localhost:80/
to localhost:8080/$1
. That means localhost/phpmyadmin
will be redirected to localhost:8080/pypmyadmin
, which is clearly not what you want.
My recommendation is to create Jenkins on a context (i.e., /jenkins
), which will allow you to update the ProxyPass to be:
ProxyPass /jenkins http://localhost:8080/jenkins
Tomcat will, by default, mount this on a Jenkins context, so I’m assuming you’re running this using the built-in init script that came with your deploy. If this is the case, you’ll need to add --prefix=/jenkins
(or similar) to either /etc/sysconfig/jenkins
, or append it to where you’re manually running the server.
Subsequently, you could also ONLY pass in /jenkins, but you may run into issues with internal links; you can this via Apache like so (with no changes to Jenkins):
ProxyPass /jenkins http://localhost:8080/
Attribution
Source : Link , Question Author : user45761 , Answer Author : Andrew M.