delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/16/10:33:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
Path: not-for-mail
From: Jonathan Albrecht <jonathan DOT albrecht AT sitraka DOT com>
Subject: Re: cygrunsrv and apache - success
Date: Thu, 16 Jan 2003 10:30:33 -0500
Lines: 90
Message-ID: <3E26D019.5030201@sitraka.com>
References: <b04qg2$vvq$1 AT main DOT gmane DOT org> <3E25F283 DOT 3D80401A AT wapme-systems DOT de>
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130
X-Accept-Language: en-us, en
In-Reply-To: <3E25F283.3D80401A@wapme-systems.de>

Thanks for the tip. That fixed it for me. For posterity, here is 
everything that I did:

1. Create a new local user named apache. I put it in the Users group. 
Add it to /etc/passwd using a command like:

 > mkpasswd -l | grep apache >>/etc/passwd

The apache user was assigened to the existing None group so I left it 
like that.

2. Modify /etc/apache/httpd.conf to set:
User apache
Group None

3. Run:
 > chown SYSTEM:SYSTEM /var/log/apache/*
 > chown SYSTEM:SYSTEM /var/log/apache.log

Check that /var/log/apache/ and /var/run are writable by SYSTEM.

4. Run:
 > cygrunsrv -I apache -d "Cygwin apache" -p /usr/sbin/httpd -a '-k' -e 
"CYGWIN=ntsec nosmbntsec binmode tty"
 > cygrunsrv -S apache

No errors were reported.

5. Check the Control Panel\Administrative Tools\Services app (I'm on 
Win2k) to see if Cygwin apache is running.

6. Check if

 > net stop apache
 > net start apache

work.

7. Point your browser at your machine and see if you get the Apache 
default page.

Well that's all I remember doing anyway. Let me know if I'm missing 
anything.

So far it looks like everything is working. Thanks everyone for your help.

Jon

Stipe Tolj wrote:
> Jonathan Albrecht schrieb:
> 
>>I've been trying to run apache as a service using cygrunsrv. I haven't
>>changed the httpd.conf and running /usr/sbin/httpd from the command line
>>works fine. Here is what I have done:
>>
>> > cygrunsrv -I apache -d "Cygwin apache" -p /usr/sbin/httpd -a -k -e
>>"CYGWIN=ntsec nosmbntsec binmode tty"
>>
>>          > cygrunsrv -S apache
>>
>>cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
>>The service has not been started.
>>
>>I've tried variations on the spaces and quotes in the command line but
>>nothing has worked. Any ideas?
> 
> 
> check file permissions. 
> 
> cygrunsrv will start the httpd processes as SYSTEM, hence all logging
> directory have to have write permissions for that user or group.
> 
> Stipe
> 
> tolj AT wapme-systems DOT de
> -------------------------------------------------------------------
> Wapme Systems AG
> 
> Vogelsanger Weg 80
> 40470 Düsseldorf
> 
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
> 
> E-Mail: info AT wapme-systems DOT de
> Internet: http://www.wapme-systems.de
> -------------------------------------------------------------------
> wapme.net - wherever you are
> 



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019