I am using Ubuntu 10.04 on linode, and I have installed apache2 and Rails 3.2.2. My application works fine on example.com:3000
I have followed the instructions to install Phusion passenger here:
http://www.modrails.com/install.html
and here:
http://wiki.brightbox.co.uk/docs:rvm
But I am not sure how to actually run my application on example.com in production mode. What is the command I type in to do this? Do I do 'rails server' or 'rails server -p 80'? What is the command I use?
EDIT 1:
My Virtualhost file is located in
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.com
ServerAlias www.example.com
DocumentRoot /srv/www/example.com/public_html/
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
<Directory /srv/www/example.com/public_html/>
AllowOverride all
Options -Multiviews
</Directory>
</VirtualHost>
One thing I am not sure of is whether I should have the directory as
/srv/www/example.com/public_html/
/srv/www/example.com/public/
The linode installation guide stated the first method (http://library.linode.com/web-servers/apache/installation/ubuntu-10.04-lucid), but Passenger states the second. Does it matter as long as it is consistent?
My passenger module bits are as follows in /etc/apache2/mods-available:
in passenger.conf
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p125/ruby
in passenger.load
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p125/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
EDIT 2: I have now added the passenger module bits to the apache configuration file instead of the passenger.conf and passenger.load files. And I set the following for this to work:
config/environments/production.rb ... config.assets.compile = true ...