httpd啟動時報錯,不能解釋localhost
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
原因:這個問題應(yīng)該是沒有在 /etc/httpd/conf/httpd.conf 中設(shè)定 ServerName。所以apache會用主機上的名稱來取代遇绞,首先會去找 /etc/hosts 中有沒有主機的定義键袱。
解決:
修改/etc/httpd/conf/httpd.conf,? 添加/修改 ServerName localhost:80
在 /etc/hosts 中填入自己的主機名稱 myhost燎窘,如下:127.0.0.1 ?myhost