#Passenger Apache Install
First, install passenger. This will help with the rest of the install.
sudo gem install passenger
sudo passenger-install-apache2-module
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install apache2-mpm-prefork
sudo apt-get install apache2-prefork-dev
sudo apt-get install libapr1-dev
sudo apt-get install libaprutil1-dev
After it compiles you need to setup the Apache Config file (httpd.conf)
LoadModule passenger_module /home/leo/.rvm/gems/ruby-1.9.3-p125/gems/passengehttps://gist.github.com/miner-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /home/leo/.rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11
PassengerRuby /home/leo/.rvm/wrappers/ruby-1.9.3-p125/ruby
##Apache Configuration File
sudo gedit /etc/apache2/httpd.conf
<VirtualHost *:80>
ServerName www.blog.com
DocumentRoot /somewhere/public # <-- Rails public folder
<Directory /somewhere/public>
AllowOverride all # <-- relax Apache security settings
Options -MultiViews # <-- MultiViews must be turned off
</Directory>
Server name can be mysite.com. You should point the Document root at the rails public folder.
##Check your Apache Server Status /etc/init.d/apache2 status
##Check your Apache version /usr/sbin/apache2 -v
##Restart Apache sudo apachectl graceful sudo apachectl stop sudo apachectl start sudo apachectl restart
or
/etc/init.d/apache2 start
/etc/init.d/apache2 stop
/etc/init.d/apache2 restart
##To see what modules are installed use: /usr/sbin/apache2 -v