1 頁 (共 1 頁)

啟動 httpd 時出現 httpd: apr_sockaddr_info_get() failed for

發表於 : 2014-06-06, 02:54
tony
在啟動 httpd 時出現

Starting httpd: httpd: apr_sockaddr_info_get() failed for MYHOST
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.

這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定 ServerName 所以它會用主機上的名稱來取代,首先會去找 /etc/hosts 中有沒有主機的定義。

所以要解決這個問題可以設定 ServerName 或者在 /etc/hosts 中填入自己的主機名稱 MYHOST,像這樣:

>vi /etc/hosts

127.0.0.1 localhost.localdomain localhost MYHOST

就可以解決了 =)