views:

156

answers:

1

I asked this a couple of days ago on Server Fault but am getting no responses and little interest. Since it is related to setting up a dev environment I thought the SO community might be able to help me out...


I just installed Passenger and the Passenger Pref Pane on OSX. However, when I try to browse to one of my Rails applications I just get the default Apache "it works!" page.

I've checked the vhost definitions and they seem ok so I can't seem to figure out whats wrong... I've tried reinstalling passenger and the pref pane and restarting apache but to no avail.

Anyone know how to fix this?

My vhost definition looks like this:

<VirtualHost *:80>
  ServerName boilinghot.local
  DocumentRoot "/Users/ganesh/Code/boilinghot/public"
  RailsEnv development
  <Directory "/Users/ganesh/Code/boilinghot/public">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
+1  A: 

You need not added the vhost manually to apache httpd.conf. Rather use the prefpane. You have to restart the server once you added the vhost in prefpane

Edit: Your question is not helpful. If you want help you need to provide more information. Show the configuration settings in httpd.conf!!

This is what it should contain:

Include /private/etc/apache2/other/*.conf
#Include /private/etc/apache2/passenger_pane_vhosts/*.conf

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
  PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11
  PassengerRuby /usr/local/bin/ruby

<IfModule passenger_module>
 NameVirtualHost *:80
  <VirtualHost *:80>
       ServerName _default_
  </VirtualHost>
  Include /private/etc/apache2/passenger_pane_vhosts/*.conf
</IfModule>
# Added by the Passenger preference pane
# Make sure to include the Passenger configuration (the LoadModule,
# PassengerRoot, and PassengerRuby directives) before this section.

You must comment out #Include /private/etc/apache2/passenger_pane_vhosts/*.conf and paste it into the <IfModule ....... > block. That works for me.

Shripad K
I AM using pref pane...
Ganesh Shankar
Thanks for clarifying and pasting your config in. It turns out I did a stupid and put the LoadModule, PassengerRoot and PassengerRuby lines AFTER the IfModule block...
Ganesh Shankar
Happy that it helped! :)
Shripad K