您的位置:首页 > 大数据 > 人工智能

apache启动时提示httpd: Could not reliably determine the server's fully qualified domain name

2016-01-27 14:32 555 查看
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name(不能可靠地确定服务器的完全限定域名)
[root@server httpd-2.2.4]# /usr/local/apache/bin/apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
1)进入apache的安装目录:(视个人安装情况而不同) [root@server ~]# cd /usr/local/apache/conf
2)编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80
[root@server conf]# vi httpd.conf
#ServerName www.example.com:80
ServerName localhost:80
3)再重新启动apache 即可。
[root@server ~]# /usr/local/apache/bin/apachectl restart

补充:原来出现这个错误原因(httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.111 for ServerName)是因为DNS没配置好. 如果不想配置DNS, 就在httpd.conf , 在最前加入 ServerName localhost:80 即可。
具体没有找到相关的原理。等后期有咨询到相关人员会将答案补足。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  服务器 server domain