Phusion Passenger on Ubuntu 9.10

At first I was thrown by the Phusion Passenger installation instructions when it talked about enabling the Passenger module in apache .conf file. In Ubuntu the enabling/disabling of modules does not sit in a .conf file but, in fact, split into individual .load/.conf files in the /etc/apache2/mods-available folder.

This means when you enable a module with a2enmod in Ubuntu it simply makes a symlink from mods-enabled -> mods-available and disabling a module (with a2dismod is just as easy. No more hunting in those .conf files.

So I wanted to keep things using the same idea of using the mods-enabled directory as opposed to using one large apache2.conf file.

Phusion Passenger Installation

Passenger is drop dead simple to install, here’s the steps.

Update the system

sudo apt-get update
sudo apt-get install apache2-prefork-dev

Now Install Phusion Passenger

sudo gem install passenger
sudo passenger-install-apache2-module

Passenger is now installed; let’s get it enabled.

Create the .load/.conf in mod-available

Create the .load file with sudo nano /etc/apache2/mods-available/passenger.load and paste in the following:

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so

Note: The version numbers I’ve used might not be what you have installed; Passenger will give you the correct version numbers on screen once installation is complete.

Create the .conf file with sudo nano /etc/apache2/mods-available/passenger.conf and paste in the following:

<IfModule passenger_module>
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.9
   PassengerRuby /usr/bin/ruby1.8
</IfModule>

Enable Passenger

Enabling Passenger is as simple as:

sudo a2enmod passenger
sudo /etc/init.d/apache2 restart

And you will need to change your /etc/apache2/sites-available/default to read:

<VirtualHost *:80>
    ServerName www.rackapp.com
    DocumentRoot /webapps/rackapp/public
</VirtualHost>

And you’re done. You’re up and running with Phusion Passenger.

You can read more about configuring Passenger here

Comments are closed.