apache 啓動故障(httpd: apr_sockaddr_info_get() failed fo)

如何解決linux下apache啓動時httpd: apr_sockaddr_info_get() failed for 報錯

2012-04-09 16:36:24|  分類:liunx|字號訂閱

今天在家裏的RHLE5.5上安裝apache的時候,先用user1用戶./configure命令配置,然後才用root用戶make && make install,結果apache起來的時候就報如下錯誤:


    httpd: apr_sockaddr_info_get() failed for bogon

    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。所以apache會用主機上的名稱來取代,首先會去找 /etc/hosts 中有沒有主機的定義。

所以要解決這個問題可以設定httpd.conf文件中的 ServerName,如下:

  (1) ServerName localhost:80                        

  或者在 /etc/hosts 中填入自己的主機名稱 bogon,如下

  (2)127.0.0.1 bogon

原文出自:http://kingphp.blog.163.com/blog/static/20042324420123943624529/


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章