Blame README.RPM

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