I have a non-rails main page running on Apache in CentOS that I want to deploy a couple rails apps from using the same domain with subdirectories. I’ve found all kinds of tutorials on how to deploy multiple Phusion Passenger rails apps but they all show the first app as the main domain. Something like this which is an example straight from phusion passenger’s documentation library
<VirtualHost *:80> ServerName www.phusion.nl DocumentRoot /websites/phusion/public <Directory /websites/phusion> Allow from all Options -MultiViews # Uncomment this if you're on Apache >= 2.4: #Require all granted </Directory> # These have been added: Alias /subapp /websites/secondapp/public <Location /subapp> PassengerBaseURI /subapp PassengerAppRoot /websites/secondapp </Location> <Directory /websites/secondapp/public> Allow from all Options -MultiViews # Uncomment this if you're on Apache >= 2.4: #Require all granted </Directory>
- Can I just use multiple alias location and directory sections, one for each app?
- Would mixing non-rails sites with rails apps on same vhost be detrimental to server performance?
- If I can’t use the same vhost for my rails apps and my main site how would I go about setting up so that I can just use www.examplesite.com/app when the main page isn’t a rails app?