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: > [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 > > "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: > > $ 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 > in: > > /usr/share/doc/Cygwin/apache-1.3.33.README > > 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: [snip] I might be wrong since I don't use Apache under Cygwin, but I would try w/o the change of owner. -- René 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/