

             ***  Apache FastCGI Module Installation  ***


Notes
=====

  See docs/mod_fastcgi.html for configuration information.
  
  This module supports Apache 1.3+.  If your server is 1.2 based, either
  upgrade or use mod_fastcgi v2.0.18.

  The FastCGI Module has not been tested on all of the Apache supported
  platforms.  These are known to work: SunOS, Solaris, SCO, Linux, Digital
  Unix, IRIX, FreeBSD and QNX (Inet sockets only).  Windows is not currently
  supported.  If your successful in using this module on other platforms, 
  please email fastcgi-developers@idle.com.

  This module is maintained at http://www.FastCGI.com.  
  
  To receive FastCGI related announcements and notifications of module
  updates, send mail to fastcgi-announce-request@idle.com with "subscribe"
  in the Subject field.  
  
  To participate in the discussion of mod_fastcgi and FastCGI application
  development, send mail to fastcgi-developers-request@idle.com with
  "subscribe" in the Subject field.
  
  
Introduction
============

  There are three approaches to configure, compile, and install Apache.

    o APACI - (Apache 1.3+) described in <apache_dir>/INSTALL

    o manual - (original) described in <apache_dir>/src/INSTALL
    
    o DSO (Dynamic Shared Object) - described in 
      <apache_dir>/htdocs/manual/dso.html
    
  If you have a binary Apache distribution, such as Red Hat's Secure
  Server (or prefer a DSO based Apache), you have to build mod_fastcgi as a
  Dynamic Shared Object (DSO) - see Section 3.


1) Installing mod_fastcgi with APACI
====================================

  1. Copy or move the mod_fastcgi distribution directory to
  <apache_dir>/src/modules/fastcgi.

  2. Specify "--activate-module=src/modules/fastcgi/libfastcgi.a" as an
  argument to ./configure from the <apache_dir> directory.  If you've
  previously used APACI to configure Apache, you can also specify this
  as an argument to ./config.status (Apache 1.3.1+) in order to
  preserve the existing configuration.

    <apache_dir>$ ./configure  \
                  --activate-module=src/modules/fastcgi/libfastcgi.a

    or

    <apache_dir>$ ./config.status  \
                  --activate-module=src/modules/fastcgi/libfastcgi.a

  3. Rebuild and reinstall Apache.

    <apache_dir>$ make
    <apache_dir>$ make install

  4. Edit the httpd configuration files to enable your FastCGI
  application(s).  See docs/mod_fastcgi.html for details.

  5. Stop and start the server.

    <apache_dir>$ /usr/local/apache/sbin/apachectl stop
    <apache_dir>$ /usr/local/apache/sbin/apachectl start


2) Installing mod_fastcgi manually
==================================

  1. Copy or move the mod_fastcgi distribution directory to
  <apache_dir>/src/modules/fastcgi.

  2. Add the FastCGI module to <apache_dir>/src/Configuration.  Note that
  modules are listed in reverse priority order --- the ones that come
  later can override the behavior of those that come earlier.  I put mine
  just after mod_cgi entry.

    AddModule modules/fastcgi/libfastcgi.a

  3. Copy the Makefile.sample to Makefile and edit if/as appropriate.

    <apache_dir>/src$ cd modules/fastcgi
    <apache_dir>/src$ cp Makefile.sample Makefile

  4. From the <apache_dir>/src directory, reconfigure and rebuild Apache.

    <apache_dir>/src$ ./Configure
    <apache_dir>/src$ make
    
  Install the new httpd.

  5. Edit the httpd configuration files to enable your FastCGI
  application(s).  See docs/mod_fastcgi.html for details.

  6. Stop and start the server.

    $ kill -TERM `cat <run_dir>/logs/httpd.pid`
    $ <run_dir>/bin/httpd -f <run_dir>/conf/httpd.conf


3) Installing mod_fastcgi as a DSO
==================================
  
  1. From the mod_fastcgi directory, compile the module.
  
    $ cd <mod_fastcgi_dir>
	<mod_fastcgi_dir>$ apxs -o mod_fastcgi.so -c *.c
    
  2. Install the module.
  
	<mod_fastcgi_dir>$ apxs -i -a -n fastcgi mod_fastcgi.so
    
  This should create an entry in httpd.conf that looks like this: 
 
    LoadModule fastcgi_module  <some_path>/mod_fastcgi.so
    
  Note that if there's a ClearModuleList directive after new entry, you'll
  have to either move the LoadModule after the ClearModuleList or add:

	AddModule mod_fastcgi.c

  3. Edit the httpd configuration file(s) to enable your FastCGI
  application(s).  See docs/mod_fastcgi.html for details.

  If you want to wrap the mod_fastcgi directives, use:

	<IfModule mod_fastcgi.c>
      .
      .
    </IfModule>

  6. Stop and start the server.

    $ <run_dir>/bin/apachectl stop
    $ <run_dir>/bin/apachectl start
