0

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.

1 Answer 1

1

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.

1
  • 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. Mar 16, 2012 at 8:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .