apache Could not reliably determine the server’s fully qualified domain name

“Could not reliably determine the server’s fully qualified domain name”

最近安装完apache,重启APACHE老出现httpd: Could not reliably determine the server’s fully qualified domain name

出现这个错误的原因是:ServerName 没有配置或配置错误的情况下用了系统IP做网站主机IP,而DNS未能配好,本机调试不需要配置DNS的情况下,可以将ServerName 改为localhost 本地环境,就不会请求DNS了

解决方案:

进入apache的安装目录,用记事本打开httpd.conf

将里面的#ServerName www.example.com:80注释去掉即可,,并改成ServerName 127.0.0.1:80。或者 ServerName localhost:80 (80是端口,只要不冲突可以改为其他端口,一般80为默认端口)

再执行httpd

重启APACHE后就不会出现那个提示了.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Protected by WP Anti Spam