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?