心静思远

凡事则欲立,不预则废!!!

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 service 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,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭