Apache httpd config for Passenger?

I need to build an Apache httpd to use with Passenger.

Does anyone have recommended/suggested args to configure?


This should all the info you

Here's what I've running on my local development:

LoadModule passenger_module
PassengerRoot /home/.rvm/gems/ruby-1.8.7-p249/gems/passenger-2.2.15
PassengerRuby /home/.rvm/rubies/ruby-1.8.7-p249/bin/ruby

<VirtualHost *:80>
  DocumentRoot /home/rails/playground/public
      AllowOverride all
      Options -MultiViews
  RailsEnv development
  RailsAllowModRewrite off


I've looked through that document already, and I don't see anything at
all about configuration directives to *build* httpd.

But If I'm wrong about that, maybe you have a more specific link?

In my experience, adding passenger to a working apache is trivial, as in sudo gem install passenger and follow the one screen of instructions that follow the compile step. Installing Apache itself is a fairly well-worn path, and should be as simple as [your package manager here] apache2, apache2 source or dev... Are you looking for a set of recommended install options? Can you tell us a little more about your server?


There is no httpd currently; I always build from source specifically
for the application in question.

Hence I'm looking for suggested optimal configure options to build
httpd to run Passenger.

I don't believe there is any specific recipe that favors passenger. Your Apache 2 should be set to allow dynamic libraries (DSOs) and really that's the only thing that could possibly flummox this as far as I know. I have installed Passenger on a Ubuntu server and a Mac OS X Server 10.5. In the former, I used a package installer for apache and its source code, and for the latter, I used the stock Apache2 that comes with Leopard Server. Perhaps someone else has a more micro-level tale to tell.


I've just build passenger from source with any stock Apache, really
splitting hairs trying to get more performance at that layer. Apache
is really only going to serve static content (images, stylesheets,
cached pages), all other work is going to be on passenger/ruby/rails/
DB. For performance you'll probably be better off spending time in
the passenger config (PassengerMaxInstancesPerApp,
PassengerPoolIdleTime, etc). Even those disappeared from my config
once I had the right stack.

I happen to use RewriteEngine alot in passenger configs, maybe set up
NameVirtualHost if you have multiple sites. But those should all be
DSOs in any vendor supplied Apache

There is no "vendor supplied" httpd in this case, but thanks anyway.