Subject: Re: Apache as a daemon (bit offtopic)
To: Joshua E Hope <otaku@unixgeek.ml.org>
From: David A. Gatwood <marsmail@globegate.utm.edu>
List: port-mac68k
Date: 08/17/1998 10:36:05
On Mon, 17 Aug 1998, Joshua E Hope wrote:

> I recently acquired Apache 1.3.1 and am attempting to configure it to run
> via inetd. I set the option in httpd.conf, and everything is installed
> properly. In /etc/inetd.conf I added the line:
> 
> http            stream  tcp     nowait  root    /usr/sbin/httpd   httpd
> 
> Then I gave inetd a sighup, and tried accessing the /index.html file only
> to get the following error:
> 
> Alert!: Unexpected network read error; connection aborted.
> 
> Any input on this problem is appreciated, and I am sorry if this is a bit
> off topic :)

Are you using the correct flags to httpd to make it run under inetd?
Check the man pages.  It sounds like it's calling httpd, which by default,
runs as a background daemon, which then forks into the background, closes
stdin, stdout, and stderr (and inetd then closes the connection abruptly),
and exits.

BTW, why are you running it under inetd?  httpd was designed primarily to
run as a background daemon, and it's much more efficient that way (less
disk/processor intensive, etc., since it doesn't have to spawn a new httpd
process every time you get a web hit).  Just wondering.


Later,
David

David A. Gatwood                         Visit globegate's internet
dgatwood@globegate.utm.edu                  talker, Deep Space 36
http://globegate.utm.edu                telnet globegate.utm.edu:9624

-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++ ++>$ UBLAS*++ ++>$
P+?>$ L++ +>$ !E--- W++ +>$ N++(++ +)>++ +$ !o? K-? !w--- !O
M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t++ +>$ 5+>++ ++$ !X- !R tv+>$
b++>$ !DI !D- G++(++ +)>$ e>++ ++ h--! r--- !y-

------END GEEK CODE BLOCK------