This is the mail archive of the
mailing list for the Cygwin project.
Re: trouble running Apache 1.3.33-2 as a service
- From: René Berber <r dot berber at computer dot org>
- To: cygwin at cygwin dot com
- Date: Tue, 25 Nov 2008 00:45:04 -0600
- Subject: Re: trouble running Apache 1.3.33-2 as a service
- References: <F7C38DDE00AA4DCF9B100FB2BF658A27@p43400e>
David Christensen wrote:
> I have a fresh install of Cygwin on Windows XP Professional SP3,
> including Apache.
> I have created a Windows account "www" and updated /etc/passwd:
> $ mkpasswd -l | grep www >> /etc/passwd
This is usually done with "mkpasswd -l -u www >> /etc/passwd" and making
sure you don't already have a line for that user.
> I have edited /etc/apache/httpd.conf:
> < #User nobody
>> User www
Danger Will Robinson! Windows requires certain privileges for a user to
be able to change a process owner... I would do things different: use
cygrunsrv to start Apache as user www, and comment out the User config
line (as it was originally).
> I can successfully start Apache via apachectl:
This is really not interesting... you need it running as a Windows service.
> $ apachectl start
> /usr/sbin/apachectl start: httpd started
> "apachectl status" does not work, even if I attempt to enable it in
You have to configure Apache to enable this option.
> "apachectl stop" does not stop Apache, and displays a mangled error
> $ apachectl stop
> ?) not runninghectl stop: httpd (pid 2628
> I can kill Apache if I choose the right PID:
> $ ps -a | grep httpd
> 2628 1 2628 2628 0 500 21:21:48 /usr/sbin/httpd
> 1984 2628 2628 1984 0 500 21:35:40 /usr/sbin/httpd
> 3956 0 0 3956 0 500 Dec 31 /usr/sbin/httpd
> $ kill 2628
> I would like to have Apache automatically start at system boot and stop
> and system shutdown, and have attempted to follow the instructions given
> I installed Apache as follows:
> $ cygrunsrv.exe -I httpd -d "CYGWIN httpd" -p /usr/sbin/httpd -a -F
As I said before, I would add the "-u www" option at least, probably "-s
? -y tcpip -o" (I don't remember which signals are used with Apache).
You are using -F with Apache, is that "foreground"? I prefer to run
daemons as daemons using "-x /path/to/apache.pid".
> "Services" shows:
> Name: CYGWIN httpd
> Description: <blank>
> Status: <blank>
> Startup Type: automatic
> Log on as: Local System
Use "cygrunsrv -VQ httpd", is Account LocalSystem? or it has a space
like you show?
> Attempting to start the service:
I might be wrong since I don't use Apache under Cygwin, but I would try
w/o the change of owner.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html