apache启动时httpd: apr_sockaddr_info_get() failed for

若如初见. 提交于 2019-12-10 11:13:22

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

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 ServerName

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

解决办法:

(1)可以设定httpd.conf文件中的 ServerName,如下:ServerName localhost:80                        

(2)在 /etc/hosts 中填入自己的主机名称 bogon,如下:127.0.0.1 shiwei (用户名称)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!