当启动apache出现[Thu Feb 17 13:58:55 2011] [alert] (EAI 2)Name or service not known: mod_unique_(2011-02-17 14:04:48)转载标签: 启动apache错误杂谈
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 "AY110216044557c"
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 AY110216044557c 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前的注释去掉就行。
星期四, 05/12/2011 - 20:26 — 杨超