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

Solution:

1. Modify the apache2 configuration file apache2.conf

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

2. Add the following line at the end of the file, save and exit

ServerName localhost:80

Insert image description here
3. Test

sudo /etc/init.d/apache2 restart

Guess you like

Origin blog.csdn.net/qq_34125713/article/details/128251727