解决apache启动错误 AH00558: httpd: Could not reliably determine...

[root@localhost httpd-2.4.7]# /usr/local/httpd/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message

apache 启动出现这种错误的解决方法:


将 apache 的配置文件httpd.conf中的 ServerName 改成可用域名或如下配置

ServerName localhost:80
 

不要与已有的端口重复即可

小技巧:apache启动错误 AH00072: make_sock: could not bind to address [::]:443

在windows下准备准备开启apache,发现端口被占用,看了host.conf里面配置的listen端口是80,但是提示是443,奇怪了,查了下资料,原来443是apache-ssl的端口。

那就查一查是谁占用了:

netstat -ano|findstr "443"
1
然后根据进程号 17208 继续查找:

tasklist|findstr "17208"
1
可见433由vmare占用,然后打开“任务管理器”找到 vmare-hostd.exe这个进程关掉就可以。

PS:也可以不关掉vmare,那就解决apache了: 
方案1:进入Apache的安装目录,搜索httpd-ssl.conf,右击文本打开。寻找443替换成其他不常用的端口号,比如442。接下来就可以正常启动Apache了。

方案2:直接关闭Apache的SSL模块, 反正暂时还用不到,\xampp\apache\confhttpd.conf文件,#LoadModule ssl_module modules/mod_ssl.so 和#Include conf/extra/httpd-ssl.conf

  • 7
    点赞
  • 33
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
启动httpd服务失败并且出现AH00558错误是因为服务器无法可靠地确定其完全合格的域名。这个问题可以通过以下方法解决: 1. 打开httpd配置文件:`vim /etc/httpd/conf/httpd.conf` 2. 在配置文件中找到`ServerName`的行,确保其值设置为服务器的完全限定域名或IP地址。如果这一行前面有注释符号“#”,那么需要将其删除。 3. 如果你不知道服务器的完全限定域名,可以将`ServerName`的值设置为`localhost:80`来解决这个问题。 4. 保存并退出配置文件,并重新启动httpd服务:`systemctl restart httpd` 这样,你应该能够成功启动httpd服务并且不再看到AH00558错误消息了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [解决AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using ...](https://blog.csdn.net/qq_52197320/article/details/129792027)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Linux AH00558: apache2: Could not reliably determine the server‘s fully qualified domain name](https://blog.csdn.net/qq_34125713/article/details/128251727)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [apache启动报错:httpd: apr_sockaddr_info_get() failed](https://download.csdn.net/download/weixin_38689041/14090783)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值