首頁  >  文章  >  資料庫  >  Apache shutdown unexpectedly啟動錯誤如何解決? (方法介紹)

Apache shutdown unexpectedly啟動錯誤如何解決? (方法介紹)

不言
不言轉載
2019-01-07 10:52:048163瀏覽

這篇文章帶給大家的內容是關於Apache shutdown unexpectedly啟動錯誤如何解決? (方法介紹),有一定的參考價值,有需要的朋友可以參考一下,希望對你有幫助。

xampp啟動時顯示的錯誤為:

9:52:41  [Apache] Attempting to start Apache app...

9:52:41  [Apache] Status change detected: running
9:52:42  [Apache] Status change detected: stopped
9:52:42  [Apache] Error: Apache shutdown unexpectedly.
9:52:42  [Apache] This may be due to a blocked port, missing dependencies, 
9:52:42  [Apache] improper privile,##9:52:42  [Apache] improper privile,##9:52:42  [Apache] improper privile,##9:52:42  [Apache] improper privile, a shothers, or a sh.
9:52:42  [Apache] Check the "/xampp/apache/logs/error.log" file

9:52:42  [Apache] and the Windows Event Viewer for more clues

這個問題比較常見, 通常是80、443埠被佔用

cmd 透過運行apache/bin/httpd.exe 印出如下log: 

(OS 10048)通常每個套接字位址(協定/網路位址/連接埠)只允許使用一次。 : make_sock: could not bind to address 0.0.0.0:443 
或後面是80埠被佔用

#(OS 10048)通常每個套接字位址(協定/網路位址/埠)只允許使用一次。 : make_sock: could not bind to address 0.0.0.0:80  或[ : : ]:80 

##一、最快的處理方法就是修改埠號:

1、443端口被佔用,apache無法監聽443端口,該如何解決?

在/xampp/apache/conf/extra/httpd-ssl.conf 

把Listen 443 修改為444(可自訂)

2、80埠被佔用,apache無法監聽80端口,該如何解決呢?

在/xampp/apache/conf/extra/httpd.conf 

把Listen 80 修改為88(可自訂)

如果設定了vhosts的話請把httpd -vhosts.conf 中埠改為88(同上埠號)

二、最直接的方法是關閉佔用80、443埠的程序:

1.透過cmd中netstat -ano 看看本機80、 443埠被佔用沒              ----- --這裡可能會被其他程式佔用如iis、虛擬機器等

​​2.透過cmd列印tasklist ,尋找佔用80、443埠的進程名稱。 
3.taskkill /pid 埠號 殺掉此程序名稱,XAMPP重啟apache即可。

綜上所述第一種方法建議使用,第二種每次啟動都或多或少的再次遇到。

以上是Apache shutdown unexpectedly啟動錯誤如何解決? (方法介紹)的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:csdn.net。如有侵權,請聯絡admin@php.cn刪除