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