解決linux重啓apache遇到:Could not reliably determine the server's ...的錯誤

啓動apache遇到錯誤:

Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
httpd not running, trying to start
1、進入apache的安裝目錄:(視個人安裝情況而不同)

cd /usr/local/apache24/conf
2、編輯httpd.conf文件,搜索(搜索:/你要搜索的字符串)"#ServerName",添加ServerName localhost:80  

#ServerName www.example.com:80    
ServerName localhost:80
3、再重啓apapche即可

/usr/local/apache24/bin/apachectl restart



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章