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