
我在終端機中編寫了程式碼:
sudo service apache2 restart
並得到回應:
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
為了防止此訊息,您應該透過將以下行新增至檔案來告訴它您希望從本機主機提供服務/etc/apache2/apache2.conf
:
sudo gedit /etc/apache2/apache2.conf
然後添加行
ServerName localhost
儲存並退出然後嘗試重新啟動:
sudo service apache2 restart