XAMPP Apache 启动失败,端口被占用 This may be due to a blocked port, missing dependencies
出现如下错误
13:22:40 [Apache] Status change detected: running
13:22:41 [Apache] Status change detected: stopped
13:22:41 [Apache] Error: Apache shutdown unexpectedly.
13:22:41 [Apache] This may be due to a blocked port, missing dependencies,
13:22:41 [Apache] improper privileges, a crash, or a shutdown by another method.
13:22:41 [Apache] Press the Logs button to view error logs and check
13:22:41 [Apache] the Windows Event Viewer for more clues
13:22:41 [Apache] If you need more help, copy and post this
从日志上分析为端口被占用,Apache 默认启动需要80 & 443 端口,
【排查方法】
1、telnet,查看端口占用情况
telnet 127.0.0.1 80
telnet 127.0.0.1 443
2、通过 XAMPP 面板中的 netstat 查看端口,如图
如果可以看出 443 端口被 vmware-hostd.exe占用
解决方法(两种):
1、关闭vmware-hostd.exe开启的服务,在系统服务中找到 VMware Workstation Server 服务器,关闭次服务,不会对VMware产生影响
2、修改XAMPP Apache conf 配置文件,修改httpd-ssl.conf 中监听443端口修改为444或者其他没占用的端口
总结:通过以上方法解决端口被占用 This may be due to a blocked port, missing dependencies,端口占用从很多层面科检测,本文中主要443端口被占用,如果80端口被占用,同样方法修改httpd.conf 文件
以上为Max在试用XAMPP存在的问题,希望给大家带来帮助