美文网首页
httpd启动时报错,不能解释localhost

httpd启动时报错,不能解释localhost

作者: ittony | 来源:发表于2017-06-14 09:45 被阅读0次

httpd启动时报错,不能解释localhost

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 中有没有主机的定义。

解决

修改/etc/httpd/conf/httpd.conf,  添加/修改 ServerName localhost:80

在 /etc/hosts 中填入自己的主机名称 myhost,如下:127.0.0.1  myhost

相关文章

网友评论

      本文标题:httpd启动时报错,不能解释localhost

      本文链接:https://www.haomeiwen.com/subject/bdrnkttx.html