部署OpenStack问题汇总(七)--解决apache启动错误"httpd:Could not reliably determine..."

今天在调试openstack的时候,重启apache,出现以下报错:

[root@hctrl log]# service httpd restart
停止 httpd:[确定]
正在启动 httpd:httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[确定]
 
在/etc/hosts上折腾了一会,无果。
后来在google和baidu上搜索发现,需要在http配置文件中修改一个地方
1)进入apache的安装目录:(视个人安装情况而不同) [root@server ~]# cd /usr/local/apache/conf
 
2)编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80
 
重启httpd正常
[root@hctrl ~]# 
[root@hctrl ~]# service httpd restart
停止 httpd:[确定]
正在启动 httpd:[确定]
原文地址:https://www.cnblogs.com/horizonli/p/5172247.html