XAMPP启动apache时显示如下错误:
上午 12:33:52 [Apache] Error: Apache shutdown unexpectedly.
上午 12:33:52 [Apache] This may be due to a blocked port, missing dependencies,
上午 12:33:52 [Apache] improper privileges, a crash, or a shutdown by another method.
上午 12:33:52 [Apache] Press the Logs button to view error logs and check
上午 12:33:52 [Apache] the Windows Event Viewer for more clues
上午 12:33:52 [Apache] If you need more help, copy and post this
上午 12:33:52 [Apache] entire log window on the forums
查到这个问题一般因为80端口被占用,于是在htttp.conf中改为监听8080端口,但是仍然报错。可能443端口也被占用。
解决方案:
1. 在命令行中netstat -ano 查看端口是否被占用。果不其然,被PID为2276的进程战勇。
、
2. 继续tasklist,根据PID发现占用443端口的原来是Vmware。(安装 Vmware 虚拟机的100%中招)
3. 解决方案有两个,一是和端口80修改httpd.conf一样,在httpd-ssl.conf中修改把Listen 443修改为444或者其他;二是在cmd中 taskkill /PID 端口号 将进程直接杀掉,在XAMPP中重启Apache即可。