windows7 x86_64系统安装xampp后apache无法启动,报Error: Apache shutdown unexpectedlyThis may be due to a blocked

来源:互联网 发布:营销网络是什么 编辑:程序博客网 时间:2024/05/15 23:51

windows7 x86_64系统安装xampp后apache无法启动,报Error: Apache shutdown unexpectedly.This may be due to a blocked port, missing dependencies…的解决办法。


要获取最新的xampp安装包,可以去官网下载https://www.apachefriends.org/download.html,这里面包含windows、linux和mac三个平台的版本,安装步骤很简单,不懂可以自行度娘,这里就不介绍了。
PS:一般不建议安装到C盘。

具体报错如下图:

报错如下图
从错误描述可以看出,可能是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.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums

>>>>>>>>>>>解决方法<<<<<<<<<<<<

【【【修改端口80端口】】】

点击xampp控制面板上的Apache这一栏的Config,选择“Apache(httpd.conf)”,如下图:
这里写图片描述
将80端口全部改为8081,尽量不要选择0-1023,这些是系统保留端口。可以选择1024-49152端口,剩下的是随机动态端口是49152-65535,端口号最大不超过65535。

Listen 8081 #原来为80
ServerName localhost:8081 #原来为80

保存退出。

【【【修改监听端口443端口】】】

点击xampp控制面板上的Apache这一栏的Config,选择“Apache(httpd-ssl.conf)”
将监听端口443改为4433。

Listen 4433 #原来为443

保存退出。

【【【点击XAMPP的”Config“,如下图:】】】

这里写图片描述
点击 ”Service and Port Settings“,如下图:
这里写图片描述
选择Apache,将“Main Port”改为“8081”,“SSL Port”改为“4433”,如下图:
这里写图片描述
最后点“Save”。

1 0
原创粉丝点击