I want to run my Rails' apps with Apache using FCGI.

Rails Wiki Howto

  1. install fcgi packages: libfcgi0, libfcgi-dev
  2. install fcgi apache module: libapache2-mod-fcgid
  3. install fcgi ruby gem: gem install fcgi
  4. modify your apache conf file (/etc/apache2/sites-enabled/000-default)
    • optionally enable mod_rewrite: a2enmod rewrite
  5. modify the fcgid.conf file (/etc/apache2/modules-enabled/fcgid.conf)
    • AddHandler fcgid-script .fcgi
    • DefaultInitEnv RAILS_ENV development
  6. create folder in web document root for rails apps
    • mkdir /var/www/rails
    • chgrp www-data /var/www/rails
    • chmod g+s /var/www/rails
  7. set up a rails app
  8. configure rails app to use fcgi (app_home/public/.htaccess)
    • comment out fastcgi stuff (cause we're using fcgid!)
    • use dispatch.fcgi instead of dispatch.cgi
Topic revision: r1 - 16 May 2008, ColeBeck
 

This site is powered by FoswikiCopyright © 2013 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback