apache启动时httpd: apr_sockaddr_info_get() failed for

执行apachectl start时候,提示以下错误:apache

httpd: apr_sockaddr_info_get() failed for shiwei
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerNamedom

缘由:这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName。因此apache会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。spa

解决办法:server

(1)能够设定httpd.conf文件中的 ServerName,以下:ServerName localhost:80                        get

(2)在 /etc/hosts 中填入本身的主机名称 bogon,以下:127.0.0.1 shiwei (用户名称)hosts

相关文章
相关标签/搜索