今天在安裝xampp的時候,啓動的時候apache無法啓動,報了這個錯誤,具體錯誤爲:
22:41:13 [Apache] Error: Apache shutdown unexpectedly.
22:41:13 [Apache] ,
22:41:13 [Apache] improper privileges, a crash, or a shutdown by another method.
22:41:13 [Apache] Press the Logs button to view error logs and check
22:41:13 [Apache] the Windows Event Viewer for more clues
22:41:13 [Apache] If you need more help, copy and post this
22:41:13 [Apache] entire log window on the forums
用命令行運行httpd.exe,會將具體的報錯信息顯示出來
顯示443端口不能被使用,那麼就是這個端口被佔用了
有兩個解決方法:
第一:找到佔用的程序,手動將這個程序關掉
進程相關命令
netstat –ano #查看所有進程
netstat -ano|findstr 443 #查詢443端口的進程
tasklist|findstr 443 # 關閉443進程
第二:將端口號修改一直,比如將443變爲444,文件爲httpd-ssl.conf;
我的具體路徑爲:H:\xamp\apache\conf\extra\httpd-ssl.conf
修改完之後重啓apache,就可以了。