xampp启动错误提示Apache shutdown unexpectedly的解决方法
xampp启动时显示的错误为:
16:28:41 [Apache] Attempting to start Apache app...
16:28:41 [Apache] Status change detected: running
16:28:42 [Apache] Status change detected: stopped
16:28:42 [Apache] Error: Apache shutdown unexpectedly.
16:28:42 [Apache] This may be due to a blocked port, missing dependencies,
16:28:42 [Apache] improper privileges, a crash, or a shutdown by another method.
16:28:42 [Apache] Press the Logs button to view error logs and check
16:28:42 [Apache] the Windows Event Viewer for more clues
16:28:42 [Apache] If you need more help, copy and post this
16:28:42 [Apache] entire log window on the forums
如下图:
原因通常是80端口、443端口被占用导致(xampp默认使用这两个端口)
解决方法
方法一:关闭占用了80、443端口的进程
方法二:修改端口号
1、修改443端口
编辑/xampp/apache/conf/extra/httpd-ssl.conf
文件
把
Listen 443
修改为
Listen 444 (或其它端口号)
2、修改80端口
编辑/xampp/apache/conf/extra/httpd.conf
文件
把
Listen 80
修改为
Listen 88(或其它端口号)
提醒:如果配置了vhosts的话请把httpd-vhosts.conf中端口改为88(同上端口号)
修改完成后,重启apache即可。