X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: =?ISO-8859-1?Q?Ren=E9_Berber?= Subject: Re: trouble running Apache 1.3.33-2 as a service Date: Tue, 25 Nov 2008 00:45:04 -0600 Lines: 93 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) In-Reply-To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com David Christensen wrote: > I have a fresh install of Cygwin on Windows XP Professional SP3, > including Apache. >=20 > I have created a Windows account "www" and updated /etc/passwd: >=20 > $ 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: >=20 [snip] > 324c324 > < #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). [snip] > 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 >=20 > "apachectl status" does not work, even if I attempt to enable it in > httpd.conf: You have to configure Apache to enable this option. [snip] > "apachectl stop" does not stop Apache, and displays a mangled error > message: >=20 > $ apachectl stop > ?) not runninghectl stop: httpd (pid 2628 >=20 > I can kill Apache if I choose the right PID: >=20 > $ 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 >=20 > $ kill 2628 >=20 > I would like to have Apache automatically start at system boot and stop > and system shutdown, and have attempted to follow the instructions given > in: >=20 > /usr/share/doc/Cygwin/apache-1.3.33.README >=20 > I installed Apache as follows: >=20 > $ 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: >=20 > Name: CYGWIN httpd > Description: > Status: > 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: [snip] I might be wrong since I don't use Apache under Cygwin, but I would try w/o the change of owner. --=20 Ren=E9 Berber -- 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/