Re: Problem with mod_fastcgi and virtual hosts

Stanley Gambarin (
Fri, 01 Nov 1996 19:56:54 -0500

Message-Id: <>
To: Michael Smith <>
Subject: Re: Problem with mod_fastcgi and virtual hosts 
In-Reply-To: Your message of "Thu, 31 Oct 1996 14:33:14 GMT."
Date: Fri, 01 Nov 1996 19:56:54 -0500
From: Stanley Gambarin <>

[Stuff deleted]
>Now it seems to by and large work - except that when I do a PS, all the
> fastCGI processes are kids of a process owned by web which has no
> parent, so kill and restart won't work properly.
> Another issue is that I have passed the port number to by cgi scripts
> via --initial-env which is impossible in this instance.
> Any ideas what is going on?
> Thanks
> Michael Smith

	The process structure that you have described is the correct one,
however, you may run into problems with restarting and killing httpd (web)
process due to Apache's implementation.  When main process (web) recieves 
a signal, it sends a SIGTERM to the children.  One of the children is the
FastCGI application manager process (which is a child of web process and 
a parent to all FastCGI apps).  The main (web) process then waits 3 seconds
after which it sends a SIGKILL.  So, if the application manager process was
unable to kill off all of its children (i.e. FastCGI applications), then you
will have stray FastCGI processes.

	The second question seems a bit confusing, but I think what you
are trying to say is that you want to pass port number to which connection
has been made to your FastCGI application.  If that is the case, then 
indeed you can not pass it in, since FastCGI application is started up
before any connections to the client are established.  I do believe,
however, that the Port at which client has connected to is the part of the
request environment that server passes to the FastCGI application.


* Stanley Gambarin			Open Market Inc.		      *
* FastCGI (soon-to-be) Guru		245 First St. Cambridge MA 02142      *
*					(617) - 374 - 6565		      *
* mailto://					      *
* (school)    *
*				mailto://		      *