apache2: Could not reliably determine the server's fully qualified domain name

 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

問題情況:


[c-sharp] view plaincopy

  1. $ sudo /etc/init.d/apache2 restart  

  2. * Restarting web server apache2  

  3. apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName  


解決步驟:
爲了解決這個問題,你需要編輯下面這個httpd.conf文件,打開它並根據如下操作進行編輯:

[c-sharp] view plaincopy

  1. sudo gedit /etc/apache2/httpd.conf  

默認的httpd.conf是個空文件,現在向裏面加入如下內容:

[c-sharp] view plaincopy

  1. ServerName localhost  

這裏可以改成自己網站域名如www.baidu.com

保存並退出。

最後重啓服務器:

[c-sharp] view plaincopy

  1. sudo /etc/init.d/apache2 restart  

http://blog.csdn.net/firstboy0513/article/details/5866133

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