簡體   English   中英

防止apache釋放80端口

[英]Prevent apache to free the port 80

我已經在 Windows 7 - 64bit 上安裝了 WAMP2.4。 它工作正常,我也可以從本地主機和外部連接它。 系統上未安裝 Skype、IIS 或 VMware。 在“服務”中,mysql 和 apache 都設置為自動啟動並處於啟動狀態。 WAMP 的所有服務都在工作,圖標為綠色。

現在,問題是,網站經常宕機。 當它關閉時,WAMP 圖標仍然是綠色的,mysql 和 apache 仍然處於“啟動”狀態。 然后我每次都點擊“重新啟動所有服務”,它就開始工作了。

當它關閉時,我檢查了 Apache>Services 的“測試端口 80”,它說該端口沒有被使用。 同時,當我在命令提示符下使用“netstat”檢查端口 80 時,它會顯示 apache 的進程 ID。 如果我不采取任何行動,一段時間后它就會開始工作。 有什么辦法可以讓 Apache 不釋放 80 端口? 或者,任何檢查端口 80 的批處理命令,如果它空閑,重新啟動 wamp 服務?

我之前聽說過這個問題,現在我想起來了。

嘗試將這 2 個參數添加到您的httpd.conf文件中。

將它們放在 httpd.conf 中應該已經存在的這一行之后# EnableSendfile on

# AcceptFilter: Windows, none uses accept () instead of AcceptEx ()
# And do not recycle sockets between connections. This is useful
# Network interfaces for which the pilot is defective, and for
# Some network providers like vpn pilots or filters
# Anti-spam, anti-virus or anti-spyware.
AcceptFilter http none
AcceptFilter https none

幸運的是,這應該可以阻止 Apache 掛起,我認為這是你的主要問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM