Subject: RE: apache2 as service
From: "Prakash Khemani" <[email-masked]>
To: "Peter Rehley" <[email-masked]>
Cc: <[email-masked]>
Date: Fri, 17 Sep 2004 13:18:08 -0700

> I'll assume that it seemed to install correctly.  As a quick simple
> sanity check try typing the command in a bash prompt and see what
> happens.  Make sure that starts ok.  

Yes. It did start ok at the cmd prompt.

> will need to find the parameter that keeps apache in the foreground.
> cygrunsrv needs this.  Otherwise it can say that the service has not
> started when it is running.

I tried httpd -D FOREGROUND -k start

That keeps the httpd process in the foreground at the CLI.

But, even with -D FOREGROUND I get the same error when I tyr to run with cygrunsrv.

> Check the windows event viewer for more logs.  

Windows event viewer has errors saying that the cygapache service terminated unexpectedly.

> Configuration problems.  File permissions.  Check them all.

I doubt that this would be a problem. When I start it at the command line everything works fine.

Httpd spawns multiple processes. Can that be an issue?

Thanks,
Prakash

> -----Original Message-----
> From: Peter Rehley [mailto:[email-masked]]
> Sent: Friday, September 17, 2004 9:46 AM
> To: Prakash Khemani
> Cc: [email-masked]
> Subject: Re: apache2 as service
> 
> 
> On Sep 17, 2004, at 9:18 AM, Prakash Khemani wrote:
> 
> > Hi,
> >
> > I compiled & installed apache2 on cygwin+WinXP. I am able to use it
> > fine
> > - but I am not able to install it as a service.
> >
> > The run as User in the httpd.conf file is SYSTEM.
> >
> > I installed apache2 asa service using the following command
> >
> > cygrunsrv -I cygapache -p /usr/local/apache2/bin/httpd.exe -a "-k
> > start"
> > -t auto
> >
> I'll assume that it seemed to install correctly.  As a quick simple
> sanity check try typing the command in a bash prompt and see what
> happens.  Make sure that starts ok.  If it goes to the background, you
> will need to find the parameter that keeps apache in the foreground.
> cygrunsrv needs this.  Otherwise it can say that the service has not
> started when it is running.
> 
> > When I try to start it
> > cygrunsrv -S cygapache
> >
> > I get the following error
> >
> > cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error
> > 1062:
> > The service has not been started.
> >
> > Nothing is written to /var/log/cygaapche.log or to
> > /usr/local/apache2/log/error_log
> >
> Check the windows event viewer for more logs.  Might be nothing, but
> might also give hints to what may be happening.
> 
> > The pid stored in httpd.pid changes but the httpd processes don't show
> > up on doing ps -ae
> >
> Almost sounds like apache wants to start, but is encountering a problem.
> 
> > What am I doing wrong?
> >
> > I compiled and installed apache2 as the network user ENG/khemani. I had
> > to change the permissions on apache2/logs directory to be able to run
> > apache2 as the user SYSTEM.
> >
> > What more should I do?
> Configuration problems.  File permissions.  Check them all.
> 
> >
> > Thanks,
> > Prakash
> >
> > --
> > 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/
> >
> >
> >
> A Møøse once bit my sister

--
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/