Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
The VirtualHost seems to be overkill. Can you revert back to your old directive, then try accessing localhost:8080 ? I suspect that you can access the "Jenkins" from :8080 without the special apache directive. –  Tim Dec 6 '11 at 18:24

1 Answer 1

up vote 0 down vote accepted

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/
share|improve this answer
    
Thanks! but why do yo mention Tomcat? I "think" I'm not using it.. –  user45761 Dec 7 '11 at 15:19
    
Jenkins can run under a Java Application Server such as Tomcat, if you so choose. The new Jenkins packages include Winstone, which is also a JAS, but is bundled in with the package itself. By default, Tomcat mounts NAME.war on /NAME, but I wanted to cover my bases. :) –  Andrew M. Dec 7 '11 at 16:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.