文章出處

  今天安裝Apache httpd web服務器時,從官方網站上http://www.apache.org/dyn/closer.cgi下載httpd,然后在centos下解壓,安裝過程分為三部分:

      (1)./configure

      (2)make

      (3)make install (需要root權限)

默認安裝在/usr/sbin/下,執行apachectl start時候,提示如下錯誤:

httpd: apr_sockaddr_info_get() failed for shiwei
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 中有沒有主機的定義。

解決辦法:

(1)可以設定httpd.conf文件中的 ServerName,如下:ServerName localhost:80                        

(2)在 /etc/hosts 中填入自己的主機名稱 bogon,如下:127.0.0.1 shiwei (用戶名稱)

 參考網址:

http://suo.iteye.com/blog/1096296

http://blog.chinaunix.net/uid-21516619-id-1824989.html

http://blog.csdn.net/lyjtynet/article/details/4213173

 


文章列表




Avast logo

Avast 防毒軟體已檢查此封電子郵件的病毒。
www.avast.com


全站熱搜
創作者介紹
創作者 大師兄 的頭像
大師兄

IT工程師數位筆記本

大師兄 發表在 痞客邦 留言(0) 人氣()