Linux AH00558: apache2: Could not reliably determine the server‘s fully qualified domain name

apache2重启报错:AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message

解决办法:

1、修改apache2的配置文件 apache2.conf

# 一般情况下,通过二进制安装的Apache2的配置文件是在这个位置
sudo vi /etc/apache2/apache2.conf

2、在文件最后添加如下一行,保存退出即可

ServerName localhost:80

在这里插入图片描述
3、测试

sudo /etc/init.d/apache2 restart

猜你喜欢

转载自blog.csdn.net/qq_34125713/article/details/128251727
今日推荐