Matt Connolly's Blog

my brain dumps here…

Ruby on Rails Virtual Host craziness

I followed the instructions for installing ruby with passenger from this blog: http://benr75.com/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard

I had a similar problem to Tom’s comment where all my web requests ended up being handled by passenger (mod_rails). RTFM’ing about virtual hosts found a solution for me:

http://httpd.apache.org/docs/2.2/vhosts/name-based.html

The first virtual host becomes the main site. So you need a virtual host for “localhost” with ServerName localhost and DocumentRoot matching the main server DocumentRoot.

Otherwise the rails app will become the default, and the entire site will be handled by passenger. Most frustating.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: