close

本篇內容為參考保哥的部落格所做的筆記,詳細的說明請參考
http://blog.miniasp.com/post/2012/06/23/apache2-Could-not-reliably-determine-the-server-fully-qualified-domain-name-using-for-ServerName.aspx

狀況:
apache 啟動時出現錯誤訊息 Could not reliably determine the server's fully qualified domain name
大意就是找不到正確的 domain name

假設 /etc/httpd/conf/httpd.conf 已經設定正確,那請照以下方法解決
1. 設定 /etc/hosts,加上 ip 及 domain 的對應,如
    59.123.123.123  wb.twbbs.org
2. hostname 查詢目前主要的 domain name
    # hostname
    localhost.localdomain
3. 如果步驟 2 所顯示的 domain name ,並不是我們預期的那一個,那麼使用 hostname 來指定我們要的
    # hostname wb.twbbs.org
4. hostname -i 來檢查 domain name 對應的 ip
    # hostname -i
    59.123.123.123
5. 重新啟動 apache
    # service httpd restart

arrow
arrow
    全站熱搜

    wbkuo 發表在 痞客邦 留言(0) 人氣()