<?xml version="1.0" encoding="UTF-8"?>
<wiki-page>
  <author>Renato Atilio</author>
  <content>*1. Setup Apache2 with mod_fcgid*

To run Retrospectiva under mod_fcgid you will need to install the following packages:

{{{
$ sudo apt-get install apache2 libapache2-mod-fcgid libfcgi-dev
$ sudo gem install fcgi
}}}

The libfcgi-dev is needed so rubygems can install fcgi native extension. You could, otherwise, install it using apt-get instead of gem.

This section uses an Apache2 Virtual Host. If you have selected another model (e.g. an Alias directive within an existing website URL) you will probably need to write your own configuration.

The code assumes you are using "retrospectiva" as application name and "/var/www/retrospectiva/" as the path you installed it.

{{{
&lt;VirtualHost *&gt;
  ServerName your.site.com
  ServerAdmin webmaster@your.site.com
  DocumentRoot /var/www/retrospectiva/public/
  ErrorLog /var/log/apache2/retrospectiva-error.log
  CustomLog /var/log/apache2/retrospectiva-access.log combined

  DefaultInitEnv RAILS_ENV production

  &lt;Directory /var/www/retrospectiva/public/ &gt;
    Options ExecCGI FollowSymLinks
    AllowOverride all
    Order allow,deny
    Allow from all
  &lt;/Directory&gt;

&lt;/VirtualHost&gt;
}}}

*2. Retrospectiva application settings*

Within /var/www/retrospectiva/public/.htaccess, you need to comment out *all* references to AddHandler directives and to change dispatch.*cgi* to dispatch.*fcgi*

The key changes are:

{{{
# General Apache options
#AddHandler fastcgi-script .fcgi
#AddHandler cgi-script .cgi
#AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI

...

RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

...
}}}</content>
  <created-at type="datetime">2008-01-21T16:34:17+00:00</created-at>
  <title>Apache FastCGI configuration</title>
  <updated-at type="datetime">2008-01-21T16:37:48+00:00</updated-at>
  <version type="integer">3</version>
</wiki-page>
