How to Manually create an Apache Windows Service How to Manually create an Apache Windows Service windows windows

How to Manually create an Apache Windows Service


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.


For older versions of Apache:

Apache.exe -k installnet start apache2


Click Win + R and type cmd

Below Image shows how to install Apache2.2 in windows

How to install Apache2.2 in windows

Default installation location of Apache2.2 is C:\Program Files\Apache Software Foundation but in my pc I installed directly on C:/ drive.

If you want to install Apache2.2 in Program Files folder then in type in command prompt as follows

C:\>cd Program Files ( Click Enter )

C:\>Program Files>cd Apache Software Foundation ( Click Enter )

C:\Program Files\Apache Software Foundation>cd Apache2.2 ( Click Enter )

C:\Program Files\Apache Software Foundation\Apache2.2>cd bin ( Click Enter )

in bin folder you will find httpd.exe file

C:\Program Files\Apache Software Foundation\Apache2.2\bin>httpd.exe -k install( Click Enter)

The successuful message is displayed in command prompt like above shown in the image.