啟用apache,發現80連接埠被佔用【已解決】

來源:互聯網
上載者:User

標籤:

前段時間停止了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連接埠

啟用apache,發現80連接埠被佔用【已解決】

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.