This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Starting Apache for Cygwin as a service

I had this problem too.

It is caused by apache forking itself and killing its parent, ie. the
original task the service manager starts up, then the service manager thinks
that apache has aborted and reports the error, and closes down the entire

At least to my understanding it is *something* like that.

The way to get around this problem is to use a tool called Invoker.exe that
wraps this kind of linux-like daemon behaviour, the instructions are here


Q-Games, Dylan Cuthbert.
P2P internet radio -

"Andrew DeFaria" <> wrote in message">
> What is the correct way to start Apache for Cygwin as a Windows service?
> According to it should be as
> simple as:
> $ cygrunsrv -I Apache -p /usr/sbin/httpd
> (Note that page says
>   $ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe [-a
arguments] \
>       [-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd]
> However there is no /usr/local/apache/httpd but there is a
> When I install the service this way and attempt to start it via
> cygrunsrv -S Apache I get the following:
> cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
> The service has not been started.
> Yet there are httpd processes started. Additionally the Apache service
> in Windows Services applet does not show as Started thus cannot be
> stopped. Further a cygrunsrv -E Apache does not stop the httpd's but
> apachectl stop will stop them. Two cygrunsrv -S Apache will result in
> multiple httpd threads being started and an apachectl stop will only
> stop one of the threads.
> Starting the service the "Windows" way via the Services applet will yield:
>     The Apache service on Local Computer started and then stopped. Some
>     services stop automatically if they have no work to do, for example,
>     the Performance Logs and Alerts service.
> And, again, the service is not listed as started thus not stoppable via
> the Services applet.
> So what is the appropriate cygrunsrv command to install Apache for
> Cygwin as a Windows service?
> --
> Unsubscribe info:
> Bug reporting:
> Documentation:
> FAQ:         

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]