CentOS 6.4 環境搭建出現的問題:
在啓動 httpd 時出現
正在啓動 httpd:httpd: apr_sockaddr_info_get() failed for hostname
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
去找 /etc/hosts 中有沒有主機的定義
先查看自己的主機名 # hostname
vim /etc/hosts
將有127.0.0.1的那一行改爲127.0.0.1 localhost.localdomain localhost [你自己的主機名]
修改/etc/httpd/conf/httpd.conf文件中的ServerName HOSTNAME爲
ServerName 127.0.0.1:80 ,保存退出。
重啓apache
/etc/init.d/httpd restart
successful!!