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

I've got two apache2 instances running on my box. One came with a bitnami redmine stack which sole purpose is to host Redmine at host:8080/redmine. The other apache instance is running with php and such and is where I specify all the VHosts for my domains.

Now I'd like to point redmine.somedomain.com at www.somedomain.com:8080/redmine so that redmine is accessible through a subdomain and on port 80. Redmine is a Ruby on Rails app and runs with Phusion Passenger so I can't just point the vhost to the htdocs directory of the redmine install.

How is this done? I've tinkered with ProxyPass and ProxyPassReverse but I just can't get it working.

All help is greatly appreciated.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This will work for basic applications. I'm not familiar with redmine, so I'm not sure this will work.

ProxyRequests Off

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

<VirtualHost redmine.example.com:80>
    ProxyPass / http://localhost:8080/redmine
    ProxyPassReverse / http://localhost:8080/redmine
</VirtualHost>

There's more information on Running a Reverse Proxy if your application doesn't like this configuration. It happens sometimes when web applications get picky about the HTTP headers, or similar aspects of incoming requests.

share|improve this answer
    
I'm able to navigate to the redmine application now and I can see the frontpage text, thanks. However, there's no stylesheet present and if I click on one of the links I get a 404. –  John Mar 26 '10 at 20:18
    
Actually, what seems to be the problem is that the links on the front-page has /redmine appended to the url.. So the url would in fact become; redmine.mydomain.com/redmine/projects .. As redmine.mydomain.com is already pointing at the root of redmine this becomes an issue –  John Mar 26 '10 at 20:21
    
You'll need to change the ProxyPassReverse line. It changes the URLs in the proxied pages so the links work. If you see links on the page that point to redmine.mydomain.com/redmine then the line should be ProxyPassReverse / http://redmine.mydomain.com/redmine (probably). –  Chris S Mar 28 '10 at 13:50

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.