mod_fastcgi -- a minimal httpd.conf

Mark Brown (
Thu, 15 Aug 1996 15:36:43 -0400

Message-Id: <>
Subject: mod_fastcgi -- a minimal httpd.conf
Date: Thu, 15 Aug 1996 15:36:43 -0400
From: Mark Brown <>

There's been quite a bit of traffic lately reporting problems some
folks have had getting mod_fastcgi working with Apache 1.1.1.

In the interests of simplifying the problem a little bit I've produced
the following minimal httpd.conf for Apache 1.1.1 with mod_fastcgi.
Using this config eliminates a huge number of variables that can
affect whether or not your server is working.

If you have trouble getting Apache 1.1.1 to work with mod_fastcgi,
please try getting it to work using the config and recipe below.  Pay
special attention to the rough edges marked XXX.  Once you've got the
server working with the minimal config you can go on to attempt more
complex things, knowing that at least the main path through the server


* * * * *

# Minimal httpd.conf for Apache 1.1.1 and FastCGI Developer's Kit 1.5
# For testing purposes only -- not for production use!
# 1. Change $APACHE to path name of dir containing your Apache 1.1.1
#    kit, i.e. the directory containing the Apache 1.1.1 README.
#    For instance, you might change $APACHE to /udir/doe/apache_1.1.1
#    Change $FASTCGI to path name of dir containing your FastCGI
#    Developer's Kit 1.5, i.e. the directory containing the FastCGI
#    Developer's Kit 1.5 README.  For instance, you might change
#    $FASTCGI to /udir/doe/fcgi-devel-kit
#    Save this file as $APACHE/conf/httpd.conf.
# 2. Build Apache 1.1.1 with mod_fastcgi.
#    Build the FastCGI Developer's Kit 1.5.
# 3. In a shell, cd to $APACHE and start httpd:
#      % src/httpd -f $APACHE/conf/httpd.conf
# 4. Use a browser to access
#      http://$YOUR_HOST:5556/examples/echo.fcg
#    where $YOUR_HOST is the IP address of the host running httpd.

# One config file is plenty
ResourceConfig /dev/null
AccessConfig   /dev/null

# Not starting httpd as root, so Port must be larger than 1023
Port 5556

# Configure just one idle httpd child process, to simplify debugging
StartServers    1
MinSpareServers 1
MaxSpareServers 1

# Tell httpd where it should live, turn on access and error logging
ServerRoot     $APACHE
ErrorLog       logs/error.log
TransferLog    logs/access.log
ScoreBoardFile logs/httpd.scoreboard

# Tell httpd where to get documents
# XXX: No slash allowed at the end of DocumentRoot
DocumentRoot $FASTCGI

# Disable access control, allow CGI, allow symlinks, etc.
<Directory $FASTCGI/*>
Options All
AllowOverride None
order allow,deny
allow from all

# Turn on CGI processing for .cgi files, to allow easy use of cgi-fcgi
AddHandler cgi-script .cgi

# Tell Apache that mod_fastcgi should handle files ending in .fcg
AddType application/x-httpd-fcgi .fcg

# Start the echo.fcg application
# (echo.fcg is a symlink to echo, created by examples/Makefile)
# XXX: Specify '-processes 1' here since AppClass expects more than one arg
AppClass $FASTCGI/examples/echo.fcg -processes 1

# End of httpd.conf