apache启动失败:Name or service not known: mod_unique_id: unable to find IPv4 address of "narkii"

1. 在linux下执行 /usr/local/apache/bin/apachectl start , 毫无反应,再次执行restart发现启动apache失败。
2. 去apache的目录下的logs下查看错误日志,发现以下内容:
[Thu Feb 17 13:58:55 2011] [alert] (EAI 2)Name or servic e not known: mod_unique_id: unable to find IPv4 address of "narkii"
Configuration Failed


3. 针对上述错误的解决办法为:
#vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

修改 127.0.0.。。。那行为
127.0.0.1 narkii localhost.localdomain localhost

即可。

4. 若出现以下错误
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

则只需在 apache下的httpd.conf下的 ServerName localhost:80前的注释去掉就行。
————————————————
版权声明:本文为CSDN博主「harbor1981」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/harbor1981/article/details/17102791

posted @   ingemar,fang  阅读(83)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示