Knowledge Base

Convert FastCGI to Passenger

If you have an existing Ruby on Rails app at A Small Orange that was deployed with FastCGI, here are the steps to convert it to Passenger:

Note: 'myapp' is used below to represent your Rails Application directory.

  1. Add a route for the root of your site in '~/myapp/config/routes.rb':

    map.root :controller => 'user', :action => 'list'
  2. Edit '~/myapp/public/.htaccess' and comment out the CGI/FastCGI dispatcher:

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

If your website's 'public_html' is not linked to your app (your app is in a subdirectory of 'public_html'), add this to the 'myapp/public/.htaccess.

RailsBaseURI /myapp

​That's it!

Did you find this article helpful?

* Your feedback is too short