本篇文章給大家帶來的內容是關於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 privileges, a crash, or a shutdown by another method.
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啟動錯誤如何解決?(方法介紹)的詳細內容,更多請關注其它相關文章!
更多技巧請《轉發 + 關注》哦!