Skip to content

[ubuntu] apache ServerName 警告訊息

Published: at 03:18 PM (1 min read)

過去在 ubuntu 安裝完 apache,啟動時總是會出現以下這段訊息

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

最近才試著去解決產生此訊息的問題


其實是 apache2 抓不到 hostname,因此我們正確的設定 hostname 就正常了

sudo hostname ubuntu.mydomain.com

參考文章:http://blog.miniasp.com/post/2012/06/23/apache2-Could-not-reliably-determine-the-server-fully-qualified-domain-name-using-for-ServerName.aspx