httpd: Could not reliably determine the server's fully qualified domain name

启动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]# ls
extra  httpd.conf  magic  mime.types  original
[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,determine)