User Tools

Site Tools



More information about Passenger (aka. mod_rails for Apache) can be found here.


Install Passenger gem

gem install passenger

Run the installer

Execute the installation script and follow the instructions:


If you are using ruby enterprise edition make sure you use the right path:

Using ruby enterprise edition also make sure you use the right path to install gems, i.e. /opt/ruby-enterprise-1.8.6-20090201/bin/gem update
If you encounter any problems, please read the Users guide for troubleshooting tips.

Configure Apache

  • Create the following configuration in conf.d/mod_rails.conf:
# Configuration for mod_rails
# to run RubyOnRails applications within apache
LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/
PassengerRoot /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.2.2
PassengerRuby /opt/ruby-enterprise-1.8.6-20090201/bin/ruby
  • Create a VirtualHost within apache for your application:
<VirtualHost *:80>
  DocumentRoot /srv/www/example/htdocs/public
  ErrorLog logs/example-errors_log
  CustomLog logs/example-access_log combine
  <Directory /srv/www/example/htdocs/public>
    Allow from all
    AllowOverride None

Restart apache

Restart apache and your done!

service httpd restart
/srv/ · Last modified: 2012/10/27 11:27 by niwo