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
<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.
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 more
PassengerAppRoot directives per context.