Hostname

無法可靠地確定伺服器的完全限定域名,使用 ::1 作為 ServerName

  • March 14, 2015

當我使用以下命令在我的 debian 7.8 中啟動 apache 服務時:

root@debian:/home/debian# service apache2  start

[....] Starting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using ::1 for ServerName  

. 行

In my /etc/hosts

127.0.0.1   localhost    
# The following lines are desirable for IPv6 capable hosts   
::1     localhost ip6-localhost ip6-loopback   
ff02::1 ip6-allnodes  
ff02::2 ip6-allrouters  

在我的 /etc/hostname

localhost

如何解決問題?

編輯/etc/apache2/conf.d/httpd.conf,添加以下行:

ServerName localhost

引用自:https://unix.stackexchange.com/questions/190085