How to Manually create an Apache Windows Service

Jared  picture Jared · Oct 23, 2009 · Viewed 91.2k times · Source

I accidentally removed my Apache windows service trying to install another Apache web server. Does anyone know how I can create another Apache windows service from cmd? I tried "sc create ..." but I am missing a script on the end like -k start? Not sure what I need for the end of it...

I am running Apache 2.2

Thank you

Answer

Alexander Kjäll picture Alexander Kjäll · Apr 23, 2013

On Apache 2.4 the executable have changed name to httpd.exe, the command would be:

httpd.exe -k install -n "Apache2.4"

With a name switch in order to give the service a distinct name.