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前的注释去掉就行。
Logo

更多推荐