码迷,mamicode.com
首页 > Web开发 > 详细

解决apache启动错误:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

时间:2019-07-14 23:49:33      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:main   elf   进入   not   输入   using   解决   dom   技术   

启动apache遇到提示:

[root@bqh-119 conf]# ../bin/apachectl -t
httpd: apr_sockaddr_info_get() failed for bqh-119
httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
[root@bqh-119 conf]# ../bin/apachectl graceful
httpd: apr_sockaddr_info_get() failed for bqh-119
httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName

 

上面httpd:行内容的提示意思是不能确定服务器的FQDN,使用127.0.0.1代替

去掉上面提示的方法为:

输入命令vim ./conf/httpd.conf +99 回车,进入99行左右增加如下配置,然后从启apache即可

ServerName 127.0.0.1:80

技术图片

快速解决方法:

[root@bqh-119 apache]# sed -i ‘s#\#ServerName www.example.com:80#ServerName 127.0.0.1:80#g‘ ./conf/httpd.conf
[root@bqh-119 apache]# grep ServerName ./conf/httpd.conf
# ServerName gives the name and port that the server uses to identify itself.
ServerName 127.0.0.1:80

再次重启就不报提示信息了:

技术图片

解决apache启动错误:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

标签:main   elf   进入   not   输入   using   解决   dom   技术   

原文地址:https://www.cnblogs.com/su-root/p/11186456.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!