xinetd and httpd

Robert Watkins rwatkins@foo-bar.org
Fri Nov 21 11:51:00 GMT 2003


My goal is to have Apache start up when my machine boots. Using cygrunsrv,
I've set init up as an NT service (on Win2K) so that part is fine.

At first I wrote my own httpd startup script and put it into /etc/rc.d/init.d
but this frequently led to an httpd.exe.stackdump, so next I enabled the
httpd startup using xinetd. The oddity here is that the very first request
to Apache hangs (while in the background I can see that the httpd processes
have started). If I stop this request, and make another -- for the same
target page -- the page loads fine and all is right from there. If, after
the first request hangs, I stop this first request and make another -- but
this time for a different target page -- it is as if it is the very first
request and another set of httpd processes starts (one with a PPID of 1, the
others being children of this one).

/var/log/servicelog shows only the initial request, with the duration being
how long I've waited until stopping it:

  03/11/21@11:30:02: START: httpd pid=3464 from=192.168.56.9
  03/11/21@11:30:06: EXIT: httpd pid=3464 duration=4(sec)

What am I doing wrong? Below are xinetd.conf and xinetd.d/http.

Thanks,
-- Robert

--------------------
Robert Watkins
rwatkins@bar-foo.org
--------------------

----- /etc/xinetd.conf -----
defaults
{
        instances       = 60
        log_type        = FILE /var/log/servicelog
        log_on_success  = HOST PID
        log_on_failure  = HOST
        cps             = 25 30
}

includedir /etc/xinetd.d

----- /etc/xinetd.d/httpd -----
service httpd
{
        socket_type     = stream
        wait            = no
        server          = /usr/local/sbin/httpd
        log_on_success  += DURATION USERID
        log_on_failure  += USERID
        nice            = 10
        user            = rwatkins
        disable         = no
}

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list