关于启动Appach时出现Apache shutdown unexpectedly问题的解决方法

今天启动Apache时总是启动失败,提示如下:

15:45:28  [Apache] Attempting to start Apache service...
15:45:32  [Apache] Status change detected: running
15:45:33  [Apache] Status change detected: stopped
15:45:33  [Apache] Error: Apache shutdown unexpectedly.
15:45:33  [Apache] This may be due to a blocked port, missing dependencies, 
15:45:33  [Apache] improper privileges, a crash, or a shutdown by another method.
15:45:33  [Apache] Press the Logs button to view error logs and check
15:45:33  [Apache] the Windows Event Viewer for more clues
15:45:33  [Apache] If you need more help, copy and post this
15:45:33  [Apache] entire log window on the forums

查看log日志发现是80端口被占用,通常出现这种问题还可能是因为443端口被占用,这里总结一下解决方法:

1.(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 (可自定义)

也可以在XAMPP面板上直接进行修改


打开Config选项,打开第一项Appach(httpd.conf),将Listen 80修改为Listen 88

接着打开第二项Apache(httpd-ssl.conf),将Listen 443修改为Listen 444.这里修改的端口并不固定,可以任意。

2.最直接的解决方式是直接把占用了端口号的进程kill掉,但是这里并不推荐此种方法,因为下次启动的时候可能还会遇到这种问题。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值