Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure Apache2 and mod_passenger so I can have one site at the root of the server and another totally different rails instance at

My <VirtualHost> context looks like this so far:

<VirtualHost *:80>
    # Name
    DocumentRoot /var/rails/current/public
    <Directory /var/rails/current/public>
            AllowOverride all
            Options -MultiViews

    # Logfile
    ErrorLog /var/log/apache2/
    CustomLog /var/log/apache2/ combined


If anyone has any ideas on how I can achieve this, or even a totally different approach to do it, would be appreciated.

share|improve this question
up vote 1 down vote accepted

If you check the mod_passenger documentation you'll find the very answer to your question. From what your snippet shows you lack a couple of important directives to even get mod_passenger involved with your page at all. Check this section of the documentation to get a very exhausting overview on how to configure passenger to work.

When you got that and it happens that you can work with subdomains instead, I'd recommend to use two <VirtualHost> instances. Not sure if you can assign two or morePassengerAppRoot directives per context.

share|improve this answer
I managed to get it working using this. mod_passenger was actually working fine as it assumes a bunch of defaults. Thanks for this though. – Fergus Barker Mar 16 '12 at 8:21

Your Answer


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.