1f1b1eb
Using the mod_fcgid RPM Package
1f1b1eb
===============================
dbeb002
dbeb002
This mod_fcgid package includes a configuration file
dbeb002
/etc/httpd/conf.d/fcgid.conf that ensures that the module is loaded and
a391ec8
added as the handler for .fcg, .fcgi, and .fpl applications.
dbeb002
a391ec8
Example: setting up moin with mod_fcgid
a391ec8
=======================================
dbeb002
dbeb002
Setting up moin with mod_fcgid is very similar to setting it up as a regular
dbeb002
CGI application.
dbeb002
dbeb002
 * Create a directory for your wiki instance:
dbeb002
dbeb002
    DESTDIR=/var/www/mywiki
dbeb002
    mkdir -p $DESTDIR/cgi-bin
dbeb002
dbeb002
 * Copy in the wiki template data and the application itself:
dbeb002
dbeb002
    cp -a /usr/share/moin/{data,underlay} $DESTDIR
dbeb002
    cp -a /usr/share/moin/server/moin.fcg $DESTDIR/cgi-bin
dbeb002
    cp -a /usr/share/moin/config/wikiconfig.py $DESTDIR/cgi-bin
dbeb002
dbeb002
 * Fix the directory ownership
dbeb002
dbeb002
    chown -R apache:apache $DESTDIR/{data,underlay}
dbeb002
dbeb002
 * Edit $DESTDIR/cgi-bin/wikiconfig.py to suit your needs
dbeb002
dbeb002
 * Create a httpd configuration file for the wiki, e.g.
dbeb002
   /etc/httpd/conf.d/mywiki.conf
dbeb002
dbeb002
    # Wiki application data common to all wiki instances
a391ec8
    Alias /moin_static185 "/usr/share/moin/htdocs/"
dbeb002
    <Directory "/usr/share/moin/htdocs/">
dbeb002
      Options Indexes FollowSymLinks
dbeb002
      AllowOverride None
dbeb002
      Order allow,deny
dbeb002
      Allow from all
882d2d3
      <IfModule mod_expires.c>
882d2d3
        ExpiresActive On
882d2d3
        ExpiresDefault "access plus 1 year"
882d2d3
      </IfModule>
dbeb002
    </Directory>
dbeb002
dbeb002
    # Wiki instance with mod_fcgid
dbeb002
    <IfModule mod_fcgid.c>
dbeb002
      ScriptAlias /mywiki "/var/www/mywiki/cgi-bin/moin.fcg"
dbeb002
      <Directory "/var/www/mywiki/cgi-bin/">
dbeb002
        Options Indexes FollowSymLinks ExecCGI
dbeb002
        AllowOverride None
dbeb002
        Order allow,deny
dbeb002
        Allow from all
dbeb002
      </Directory>
dbeb002
    </IfModule>
dbeb002
dbeb002
 * Restart the web server to load the new configuration:
dbeb002
dbeb002
   service httpd restart
dbeb002
dbeb002
That should do it!
882d2d3
882d2d3
Ruby on Rails with mod_fcgid
882d2d3
============================
882d2d3
882d2d3
One of the differences between mod_fastcgi and mod_fcgid is that the former
882d2d3
sets the SCRIPT_NAME environment variable whilst the latter does not, and it's
882d2d3
reported (http://bugzilla.redhat.com/476658) that Ruby on Rails expects this
882d2d3
environment variable to be present. A workaround for this is to add:
882d2d3
882d2d3
ActionController::AbstractRequest.relative_url_root = ""
882d2d3
882d2d3
to the Rails::Initializer.run segment of config/environment.rb
882d2d3