Apache2 “AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message”警告

Apache2 在Ubuntu下有下面的警告:

如果是在服务器端,那么127.0.0.1就是你的服务器内网IP。

查了一下资料,在/etc/apache2/httpd.conf文件中添加一行ServerName localhost就可以解决,但是我在Ubuntu下并没有找到httpd.conf配置文件。


解决方法:在Ubuntu下,相应的文件应该是apache2配置目录(默认是/etc/apache2/)下面的apache2.conf。所以搞定这个警告的具体步骤如下:

参考:https://aslamnajeebdeen.com/how-to-fix-apache-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127011-for-servername-error-on-ubuntu



Leave a comment

您的电子邮箱地址不会被公开。 必填项已用*标注