Re: ncsa patch help

Brandon Long (
Wed, 15 May 1996 18:49:25 -0500 (CDT)

Message-Id: <>
Subject: Re: ncsa patch help
Date: Wed, 15 May 1996 18:49:25 -0500 (CDT)
In-Reply-To: <199605151820.NAA25094@vlad> from "Brian P Millett" at May 15, 96 01:20:11 pm
From: Brandon Long <>

Last time, Brian P Millett uttered the following other thing:
> I have ncsa httpd_1.5.1 and have installed the ncsa_patch for the
> fcgi-devel-kit 1.4.  Went and patched perl5.002 and installed
> I have the following in the srm.conf:
> Alias /fastCGI/ /usr/local/httpd/fcgi-devel-kit/
> # Set up a alias for FastCGI /fcgi-bin/ 
> FCGIScriptAlias /fcgi-bin/ /usr/local/httpd/fcgi-devel-kit/examples/
> # Define the AppClasses. These get hit when requests come in for
> # /fcgi-bin/tiny-fcgi.fcgi or /fcgi-bin/tiny-fcgi2.fcgi
> #AppClass /usr/local/httpd/fcgi-devel-kit/examples/tiny-fcgi.cgi -listen-queue-depth 10 -processes 2
> #AppClass /usr/local/httpd/fcgi-devel-kit/examples/tiny-fcgi2.cgi -listen-queue-depth 10 -processes 2
> AppClass /usr/local/httpd/fcgi-devel-kit/examples/tiny-perl-fcgi.cgi -listen-queue-depth 10 -processes 2

These are pointing to the CGI wrappers for the FCGI apps, which exit 
immediately, hence the continuous messages.  Remove the .cgi from the end
of the pathname.  I was able to get it working after doing that.

> When I run the httpd server, I get a lot of
> "FastCGI process
> '/usr/local/httpd/fcgi-devel-kit/examples/tiny-perl-fcgi.cgi'
> terminated due to exit" error messages.
> If I connect to the index.html at /fastCGI/, then I can select the
> tiny-cgi.cgi, tiny-fcgi.cgi, & tiny-fcgi2.cgi examples and they work!
> If I select the tiny-perl-fcgi.cgi I get a 500 error, malformed header.
> I looked at the mod_fastcgi.html file and read:
> "The AppClass directive starts one or more FastCGI application
> processes, using the executable file execPath. This file must have
> MIME-type application/x-httpd-fcgi. The server is responsible for
> restarting these processes should they die. All of the FastCGI
> application processes started by a given AppClass directive share a
> common Unix domain listening socket. 
> When a client request comes in for the file execPath, the request is
> handled by the fcgi module because of the special MIME-type
> application/x-httpd-fcgi. The fcgi module issues a connect request to
> the listening socket for the application class corresponding to
> execPath. The client request is served by the FastCGI process that
> accepts the connect request." 

This is not quite true.  Hmm, I'm not sure anything in the current
patch will actually tell the server to go to the fcgi handlers.  The patch
is against a version of the server which had preliminary fcgi support in
it.  The version of 1.5.1 available doesn't have the hooks in it, as fcgi
wasn't available for general use yet.  I will update the version of the
server pointed to by the fastcgi docs.

> Is the "execPath" relative to the FCGIScriptAlias, or absolute path?

absolute path, as near as I can tell

> How, or do I need, to set the MIME-type application/x-httpd-fcgi?  Is
> this part of the tiny-perl-fcgi, or do I add it with the AddType
> directive?

In the version you have, you don't need to set that.  Basically, the server
has to figure out that an fcgi app is being called, then it hands
it off to the fcgi code.  This is the same as with cgi or imagemap.  There
are two ways of doing this, having a ScriptAlias (or in this case, 
FCGIScriptAlias) directory, which means everything in it is of that type,
or with a magic mime type.  The version you have (that is pointed to by only has FCGIScriptAlias support, the version I'll put
up shortly should have .fcgi support as well.  You still need an AppClass
directive for each fcgi as far as I can tell.

Ok, I've placed a patched version of NCSA HTTPd 1.5.1 with FCGI support
at the location pointed to in the FCGI docs.

Feel free to let me know if you have any problems.


 Brandon Long         "I think, therefore, I am confused." -- RAW
 HTTPd/SDG/NCSA	  I violated the Communications Decency Act ... or will.
 N9WUC		Don't worry, these aren't even my views.