How to disable System service from listening to port 80

How to disable System service from listening to 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.

Resource Monitor

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:

  1. Go to device manager, select ‘View -> Show hidden devices’, go to ‘Non-plug and Play Driver -> HTTP’ and double click it to disable.
  2. 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:

0 Boot
1 System
2 Automatic
3 Manual
4 Disabled