Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: Andrew DeFaria <ADeFaria@Salira.com>
Newsgroups: gmane.os.cygwin
Subject: Starting Apache for Cygwin as a service
Date: Wed, 07 Aug 2002 15:30:45 -0700
Lines: 38
Message-ID: <3D519F95.8080908@Salira.com>
Reply-To: cygwin@cygwin.com
NNTP-Posting-Host: 206.184.204.2
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: main.gmane.org 1028759394 16161 206.184.204.2 (7 Aug 2002 22:29:54 GMT)
X-Complaints-To: usenet@main.gmane.org
NNTP-Posting-Date: Wed, 7 Aug 2002 22:29:54 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc2) Gecko/20020512 Netscape/7.0b1
X-Accept-Language: en-us, en

What is the correct way to start Apache for Cygwin as a Windows service? 
According to http://httpd.apache.org/docs/cygwin.html 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 /usr/sbin/httpd)

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 1062:
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:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

