解决启动httpd报: apr_sockaddr_info_get() failed for错误

  我测试库里 service httpd start 时报 下面错误

   httpd: apr_sockaddr_info_get() failed for fengxin.wzjzt.centos
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

    虽然不妨碍使用,还是要找出原因

    这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName。

    所以apache会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。

所以要解决这个问题可以设定httpd.conf文件中的 ServerName,如下:

   (1) ServerName localhost:80                       

   或者在 /etc/hosts 中填入自己的主机名称 bogon,如下:

   (2)127.0.0.1 bogon

注意:

当前系统的主机名请以hostname命令为准,/etc/sysconfig/network中的HOSTNAME设置有可能不一致。

/etc/sysconfig/network 默认主机名是:HOSTNAME=localhost.localdomain

posted on 2014-01-14 09:12  felx521  阅读(1357)  评论(0编辑  收藏  举报

导航