Why is port 80 being used

PID: 4 over port 80

I tried installing Zend Server CE on my computer, but when I got to the point where I need to select the port for my web server, it says "Web server port: 80 in use". So I decided to check what is using port 80 with CMD by typing: "netstat -o -n -a | findstr 0.0: 80":

I check the PID: 4 in the processes and services of the task manager. It appears that PID 4 is "System".

I want to know how to prevent System (PID: 4) from using port 80.

INFO: I use: Windows 7 64bit; Zend Server CE 5.5.0


Ok, after searching the internet for a while, I found a solution to my problem.

Just follow these steps to diagnose and fix your problem:

  1. Get the pid listening on port 80:

  2. Open Task Manager, go to the Processes tab, enable PID and use the PID found in the last step to find the process.

  3. If it's a normal use or IIS, disable or uninstall it. Some programs (like Skype) have the option to disable the use of port 80.

  4. If it's a System process ( PID 4), you must disable the HTTP.sys driver, which will be started by another service such as Windows Remote Management or Print Spooler under Windows 7 or 2008 if necessary.

    There are two ways to disable it, but the first is more secure:


    • Go to Device Manager, select "Show Hidden Devices" from Menu / View, go to "Non-Plug and Play Drivers" / HTTP, double-click it to disable it (or set it to manual one, some services depend on it).

    • Restart the computer and use to check that 80 is still in use.


    • Start RegEdit.

    • Go to

    • Change the value from "start" to 4, ie deactivated.

    • Restart your computer.

My solution was step 4 .

In my case it was WebMatrix. Possible solutions (including this one) can be found here: http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/


Open the services in Administrative Tools and find the Web Deployment Agent service. Stop the service and set the startup type to "Manual".

The Web Deployment Agent Service is provided with WebMatrix and was the cause of my problems. It can also be distributed with other applications installed with the Microsoft Web Platform Installer.

While the command did, in fact, allow Apache to start on my Windows 10 64-bit system, it wreaked havoc with trying to access localhost so that was bound to instead, even with the correct entry in my hosts - file. In the end I used this command instead: this not only worked, but also allowed browser access to localhost. For me it was a superior solution.

Open the "Services" list. Look for "World Wide Web Publishing Service". Stop the service and set it to "Manual"

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.