问题原文
原帖链接 · Vlastimil Burián · CC BY-SA 4.0
Today I installed Apache2 on my Linux Mint 21.3 and was greeted with the following message when running sudo apachectl configtest, i.e. configuration test:
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
How to get it sorted?
已采纳解答
原帖链接 · Vlastimil Burián · CC BY-SA 4.0
Edit the following file with your favorite text editor as root, e.g.:
sudo vim /etc/apache2/apache2.conf
Go to the end of this file, and add this line:
ServerName 127.0.0.1
just before the VIM syntax specification:
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Save the file, and run:
sudo apachectl configtest
it should now no longer say error AH00558, instead you should be greeted with Syntax OK.
There could be many more solutions, I guess this is more of a workaround - but maybe not. If you can do better than me, feel free to comment and answer, I will delete my answer in such a case.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
