0

We are running Apache Web Server 2.4 installed as a Cygwin package, on Windows Server 2018.

The Apache service manually started after each reboot by running:

/usr/sbin/apachectl start

From the Cygwin Terminal (bash).

I tried creating the Windows Service as follows

cygrunsrv.exe -I 'Apache Cygwin' -p /cygdrive/c/cygwin64/usr/sbin/apachectl' -a 'start'

The service is created but when I click on Start in Services I get "The Apache Cygwin service on Local Computer started and then stopped".

I tried changing the user name and password in the service properties but that has not effect.

The service status does not show as running, however, the web pages served by Apache are available, and the var/log/httpd logs are active and indicate Apache in running.

Is this normal?

How can I prevent this error?

TenG
  • 143
  • 6
  • You need to start the daemon, not it's control program. – Gerald Schneider Jun 30 '22 at 10:58
  • Thank you. I guess this means examining the `apachectl` script and constructing the start command as I presume it would invoke `httpd.exe` with a load of options. Are there any examples of this already having been done? – TenG Jun 30 '22 at 11:04
  • 2
    You could just use proper windows builds which come with service configurations instead of cygwin. – Gerald Schneider Jun 30 '22 at 11:11

0 Answers0