Hey Guys!
I recently decided to just go ahead and learn a bit more about Linux and the command line since I wanted to be able to set up my own rails stack. So I'm currently running Ubuntu 8.04 with Apache2 and Phusion Passenger.
Thus far, it all works OK! When I type in my IP in the browser, it takes me to the "Welcome aboard!" screen of my Rails test application. So now, I'm trying to figure out how I can be able to run multiple Rails applications within the same VPS. Been looking around some webblogs and such, came across this:
http://www.aeonscope.net/2009/03/15/phusion-passenger-on-ubuntu/
Contents of the URL:
Edit your virtual host file (example: /etc/apache2/sites-available/example) so that the following is used:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName one.example.com
DocumentRoot /web/one/public<Directory /web/one/public/ />
Option Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow, deny
allow from all
</Directory>
</VirtualHost>
Repeat the <VirtualHost/> block for each Rails site you want to setup.
Restart Apache to pick up the new changes by executing the following command line: sudo /etc/init.d/apache2 restart
So basically what they are saying is "for every rails app, add a new file containing the </VirtualHost> block"?
Ok, so if I do that, and have two Rails apps running, how do I find a specific app through the browser?
Cause for example, say I have 2 files located here:
/etc/apache2/sites-available/rails_app_1
/etc/apache2/sites-available/rails_app_2
And I load them both using a2ensite rails_app_1 rails_app_2.
So, if I wanted to request "rails_app_2" in the browser, how would I do this? What about if I wanted to request "rails_app_1"?
Because, just typing in the IP to my website, shows only one of the two websites obviously.
Thanks!