How to Manually create an Apache Windows Service

Viewed 96372

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

6 Answers

In Windows 7 or 8 right click the XAMPP Control Panel start (menu) shortcut and Run As Administrator. Then just click the service check boxes for Apache and/or MySQL.

Did not work for me using httpd.exe -k install, I had to register apache as a service using sc.exe using:

sc.exe create apache2.4 start= auto obj= "<account>" password= "<password>" DisplayName= "Apache 2.4" depend= "Tcpip/Afd" binpath= "\"c:\wamp\bin\apache\apache2.4.33\bin\httpd.exe\" -k runservice"
Related