解决httpd: Could not reliably determine the server’s fully qualified domain name

modern-CentOS-logo

CentOS 6.6下启动apache提示httpd: Could not reliably determine the server’s fully qualified domain name,其实只需对配置文件小作修改即可: [1]

Step 1:打开apache配置文件.

 vim /etc/httpd/conf/httpd.conf

Step 2:使用/ServerName关键字查找定位至276行,yy复制并按p粘贴,将www.example.com改为localhost完成后去掉注释#.

 273 # You will have to access it by its address anyway, and this will make
 274 # redirections work in a sensible way.
 275 #
 276 #ServerName www.example.com:80
 277 ServerName localhost:80
 278
 279 #

Step 3:重启apache服务,完成.

 service httpd restart
 停止 httpd:                                               [确定]
 正在启动 httpd:                                           [确定]

注释:
[1]所用apache版本为 httpd-2.2.15-39.el6.centos.x86_64

《“解决httpd: Could not reliably determine the server’s fully qualified domain name”》 有 1 条评论

发表评论

您的电子邮箱地址不会被公开。

:wink: :twisted: :roll: :oops: :mrgreen: :lol: :idea: :evil: :cry: :-| :-x :-o :-P :-D :) :( 8-O 8)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据