Having problems starting the Apache service on Windows 10? Probably port 80 is used by another process.
When you check which process is using port 80 (use Resource Monitor), it probably is the ‘System’ process (PID=4).
This means that a process by default installed and started by Windows is using port 80. Big chance that the ‘World Wide Web Publishing Service’ is running. Just stop it and set the Startup Type to ‘Manual’
Now try starting the Apache service again. If it is running, the Resource Monitor should now show that the ‘httpd.exe’ process is using port 80.
When you try to run Apache (or any other web server service), it can happen that Windows is not allowing to start it, because port 80 is already in use. To find out which process is using port 80, you can use the Resource Monitor (just run resmon.exe). Open the ‘Network’ tab and open the ‘Listening Ports’ section.
Another way to find out is to use ‘netstat -a -n -o | find “:80”‘.
How to solve the problem
If the process is just a ‘normal’ process, you just need to stop the associated service to free port 80. If it’s the System process (PID=4), that is using port 80, then we need to disable http.sys.
There are two ways to disable it:
- Go to device manager, select ‘View -> Show hidden devices’, go to ‘Non-plug and Play Driver -> HTTP’ and double click it to disable.
- Launch RegEdit, go to ‘HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP‘ and change to value of ‘start‘ to 4.
After this you need to reboot your computer.
The following values are valid for the ‘start’ property: