apache 启动报错 httpd: Could not reliably determine th

httpd: apr_sockaddr_info_get() failed for bogonweb

     httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerNameapache



 虽然不妨碍使用,但是看着错误总以为别扭,通过查找发现,这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName。因此apache会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。dom

因此要解决这个问题能够设定httpd.conf文件中的 ServerName,以下:spa

   (1) ServerName localhost:80                        orm

   或者在 /etc/hosts 中填入本身的主机名称 bogon,以下server

   (2)127.0.0.1 bogonci

 

 

注意get

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

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

相关文章
相关标签/搜索