80端口被NT kernel & System 占用pid 4


前段時間停止了Apache,結果在打開的時候發現無法打開,80端口被占用,於是win+r 運行cmd

輸入netstat -ano

可以看到80端口被PID4占用,於是打開任務管理器-進程-查看,選擇列,勾選PID

可以看到pid 4 的被NT kernel & System 占用

 

在網上找了很久找到解決方案

http://www.cameroncooke.com/2009/01/25/windows-7-uses-port-80-and-makes-it-impossible-to-install-apache-solution/comment-page-1/#comments

原文:

 

 

 

 

翻譯如下:

該進程是Http.sys。它是http API的驅動組件,Http棧服務器。如果該端口被Http.sys占用,說明一些正在使用http.sys的應用程序在運行。這就是阻止Apache運行的原因,因為Http.sys占用着80端口。我們提供了一種應用程序的機制來幫助控制端口共享,但是我需要調查導致你遇到這種困難的是什么特殊應用程序。如果你能提供給我們“netsh http show servicestate”這條命令的輸出結果,我就能找出是哪個應用程序在使用Http.sys。在你禁用Http.sys之前,請按照下面的步驟來運行命令:

1. sc config http stat = demand

2. reboot

3. run the command(netsh http show servicestat)as administrator

在你使用這個命令之前,你可以按照下面步驟禁用http.sys:

1. net stop http

2. Sc config http start= disabled

 

於是運行net stop http

 

按y 確定

 

在運行 Sc config http start= disabled

 

好了,現在啟動Apache,可以啟動了。

在查看一下netstat -ano

發現pid 4占用了445端口


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM