After upgrading to Windows 8, I have not been able to run Apache because Windows is taking away port 80. Doing a netstat says that PID 4 is using the port:

> netstat -ano | find "0:80"
TCP                 LISTENING       4

PID 4 is a process called "System" and not something that I can just delete.

Goggling this issue extensively, I tried to stop the “Web Deployment Agent service", I also tried to uninstall "Microsoft Web Deploy 2.0" but nothing seems to help.

Any ideas on how to resolve this?

  • I had this same problem on windows 7. It was because one of the MS SQL Server processes was consuming port 80. The process was also identified by "System". In my case, I had to disable the web management interface for SQL Server. Not sure if this is at all related though. But something on your system wants to be a web server. Try shutting down services one by one until port 80 opens up. Nov 24 '12 at 22:06
  • Parker, thanks for your suggestion about shutting down services one by one. I finally found the culprit! It was W3SVC (as detailed in my answer below).
    – Naresh
    Nov 25 '12 at 2:38

I finally found the service that was taking away port 80 - it was W3SVC (World Wide Web Publishing Service) (group is "iissvcs"). This is so random - it seems that IIS service names keep on changing between different versions of Windows, so one basically needs to just try anything that sounds similar!

  • The question here, how could we change the port of that service instead of stopping it?!
    – SaidbakR
    Aug 10 '15 at 11:52

This problem can be caused by many reasons. Check all the answers on below questions. This may help you.

1) port-80-is-being-used-by-system-pid-4-what-is-that

2) pid4-using-port-80

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.