lishenghan 发表于 2018-11-23 13:34:00

apache 启动故障(httpd: apr_sockaddr_info_get() failed fo)

如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
2012-04-09 16:36:24|分类:liunx|字号订阅




今天在家里的RHLE5.5上安装apache的时候,先用user1用户./configure命令配置,然后才用root用户make && make install,结果apache起来的时候就报如下错误:

   httpd: apr_sockaddr_info_get() failed for bogon
   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
原文出自:http://kingphp.blog.163.com/blog/static/20042324420123943624529/

  




页: [1]
查看完整版本: apache 启动故障(httpd: apr_sockaddr_info_get() failed fo)