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

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

时间:2017-11-21 01:16:39      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:class   microsoft   .com   配置文件   查询   gre   term   cat   domain   

问题原因:

  httpd服务配置文件,并没有设置解析根地址,无法可靠地确定服务器的完全合格的域名

如何解决?

  httpd的配置文件放在 /etc/httpd/conf/目录下,去掉ServerName注释,并把www.example.com:80替换成 127.0.0.1:80

  cat httpd.conf |grep ‘ServerName‘                                        # 查询域名设置
  sed ‘s@#ServerName www.example.com:80@ServerName 127.0.0.1:80@g‘ httpd.conf |grep ‘ServerName‘     # 预替换,并查看结果
  sed -i ‘s@#ServerName www.example.com:80@ServerName 127.0.0.1:80@g‘ httpd.conf |grep ‘ServerName‘   # 替换
  cat httpd.conf |grep ‘ServerName‘                                        # 查询替换后结果

  

 

 

  

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

标签:class   microsoft   .com   配置文件   查询   gre   term   cat   domain   

原文地址:http://www.cnblogs.com/2bjiujiu/p/7868650.html

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