Wamp apache无法启动

前提:好久没用wamp,并且电脑最近重装了系统,发现wamp图标变红了。

一般情况图标是红色表示 mysql 和 apache 启动不起来
一般情况图标是黄色表示 mysql 或 apache其中一个没启动起来

最简单的先单机左键,分别操作 apache 和 mysql ,点击install service,会跳出一个弹窗,一般你的80端口没被占用都会安装成功的,如果顺利他们会变成运行中,如果不顺利就是我下面遇到的问题。
在这里插入图片描述

1. mysql

mysql 比较简单,我的启动不起来是因为我下载的 MySQL 服务正在运行,和 wamp 的冲突了。

win + R 输入 services.msc

找到 MySQL 服务停止它就行。

2. apache

比较难搞的是 apache,网上搜了好多方法都不是我的问题,后来看到一个命令,可以看到启动 apache 服务时出现的错误。

找到自己的 wamp安装目录,E:\wamp\bin\apache\apache2.4.9\bin 下
输入httpd.exe

这是我遇到的三个错误:

在这里插入图片描述

第一个错误:/httpd.conf:241: <Directory> was not closed.

这个已经告诉行数了,是因为我的结束标签没有在下一行,导致没对上。

第二个错误:httpd.conf:<Directory> directive requires additional arguments

这个是因为 标签,右侧要有网站名,不知道写什么,就写 / 。

第三个错误:
AH00558: httpd.exe: Could not reliably determine the server's fully qualified domain name, using fe80::dc4b:e1e8:b7f9:7a4f. Set the 'ServerName' directive globally to suppress this message
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。  : AH00072: make_sock: could not bind to address [::]:81
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。  : AH00072: make_sock: could not bind to address 0.0.0.0:81
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

Could not reliably determine the server's fully qualified domain name, using fe80::dc4b:e1e8:b7f9:7a4f. Set the 'ServerName' directive globally to suppress this message 是需要打开 httpd.conf 中的 ServerName localhost:80
在这里插入图片描述

(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : AH00072: make_sock: could not bind to address [::]:81 (OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : AH00072: make_sock: could not bind to address 0.0.0.0:81

这个网上普遍说的是端口被占用,我搞了很多,突然发现“只允许使用一次”,想到我的 httpd.conf 中多写了两行,注释掉之后就好了…

在这里插入图片描述

希望我的文章能给你们一丝启发~

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值