好久没用XAMPP了,刚才在开启Apache服务时遇到了问题。
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method
Check the "/xampp/apache/logs/error.log" file
and the Windows Event Viewer for more clues
This may be due to a blocked port 一种可能的原因就是端口被占用了。
以前在XAMPP里开启Apache时一般都占据了80和443端口。
去检查下这两个端口是否被占用。
可以在CMD里输入netstat -ano来查看,也可以直接按XAMPP的控制面板上的Netstat按来查看当前占用的端口。
我这边很快发现443端口被虚拟机占用了,关掉这个进程。再次开启Apache就可以。
一般遇到问题就先检查下80和443端口吧。