環境:CentOS6 ,獨立IP,擁有domain name

當我執行 /usr/sbin/apachectl restart 重啟apache伺服器的時侯,跑出下列這些訊息,這表示重啟失敗
httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.com for ServerName
(xxx.xxx.com比方是我的主機名稱,如果不確定自己的主機名稱,可以用hostname指令查詢)

解決方法如下
到目錄並打開這個檔案 etc/httpd/conf/httpd.conf ,任何文件編輯器都行
找到ServerName這個選項
預設值如下
#ServerName www.example.com:80
在底下新增一行
ServerName xxx.xxx.com:80
儲存,完成!

我們再執行 /usr/sbin/apachectl restart 就會發現沒有問題了!

arrow
arrow
    全站熱搜

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