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.

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

My <VirtualHost> context looks like this so far:

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

    # Logfile
    ErrorLog /var/log/apache2/server.biz.error.log
    CustomLog /var/log/apache2/server.biz.access.log combined

</VirtualHost>

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

1 Answer 1

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

 
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.