Apache dispatch.fcgi doesn’t get interpreted with Passenger

apache-2.2phusion-passengerruby-on-rails

I've installed passenger as ruby gem. I've added following to /etc/apache2/apache2.conf

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

and set Vitual Host to rails app ~/public directory, but when I visit the site, I only see content of dispatch.fcgi, but nothing gets executed

.htaccess in ~/public directory is

AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

However, if I run script/server, everything works fine, so there is no problem with the application itself.

Best Answer

Passenger doesn't execute Rails requests via dispatch.fcgi. Have you tried following the Passenger installation instructions?