2012-03-23 98 views
1

我tryning安裝Apache和PHP在CentOS,我沒有安裝這個:阿帕奇無法啓動

yum install httpd 
yum install php 
/etc/init.d/httpd start 

和一切OK,我請與

http://localhost/ 

,但我不知道爲什麼但是當我現在做的

/etc/init.d/httpd start 

顯示

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName 

對不起,但我很喜歡服務器。

非常感謝。

+0

這更適合於http://serverfault.com/ – richsage 2012-03-23 09:33:12

+0

我建議在'/ var/log/httpd'目錄檢查日誌文件。 – 2012-03-23 09:33:48

回答

2

在CentOS上,默認情況下httpd的配置文件應該是/etc/httpd/conf/httpd.conf。編輯該文件並找到「ServerName」條目。通過刪除行開頭的#並取消註釋,並將名稱設置爲所需的名稱。保存文件並用以下命令重啓服務器:

/etc/init.d/httpd restart 

請記住,您擔心的消息只是警告,而不是錯誤。

+0

現在感謝httpd開始確定 – Jjreina 2012-03-23 10:18:45