Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got Apache (-v):

Server version: Apache/2.0.63
Server built:   Nov 29 2009 15:23:34
Cpanel::Easy::Apache v3.2.0 rev4899

I want to start new Sinatra application on passenger. I've just installed passenger gem. So now I need to set up apache configuration.

In httpd.conf there are many settings of others applications on server. So I just can't reinstall apache with passenger-install-apache2-module. I need to set up exist Apache with passenger. What have I do now?

share|improve this question
up vote 1 down vote accepted

Step one: run passenger-install-apache2-module as root. This will install the passenger module, which is required.

Step two: The passenger-install-apache2-module script will tell you what to add to httpd.conf. Add it. It should not affect any other applications you are running.

Step three: For each Ruby on Rails or Sinatra app, configure it in Apache. I do this for Sinatra apps:

<VirtualHost *:80>
  DocumentRoot /www/hman/current/public
  ExpiresDefault "access plus 10 years"

I then have in /www/hman/current which is detected by Passenger automatically.

For Rails apps:

<VirtualHost *:80>
  DocumentRoot /www/waywardgypsy-art/current/public
  ExpiresDefault "access plus 10 years"

I then use Capistrano to deploy the Rails application to /www/waywardgypsy-art.

In both cases, the .../current/public directory has files which are static in nature such as images, CSS, etc. These are served directly from Apache. Passenger looks into the virtual host's config and checks for Sinatra or Rails, and if it finds the appropriate config file, it will treat it as the appropriate application framework.

Passenger will not affect virtual hosts which do not have a Sinatra config file ( or Rails (config/boot.rb).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.