apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
發生如上錯誤. 找了半天終於找到. 只執行到將 /etc/hostname
值替換到
apache2.conf 中的 ServerName (要添加) 即可.
回答摘要:
===================================================================================================================================
This is just a friendly warning and not really a problem (as in that something does not work).
If you insert a
ServerName localhost
in either httpd.conf
or apache2.conf
in /etc/apache2
and
restart apache the notice will disappear.
If you have a name inside /etc/hostname
you
can also use that name instead of localhost
.
And it uses 127.0.1.1
if
it is inside your /etc/hosts
:
127.0.0.1 localhost
127.0.1.1 myhostname