apache绑定于127.0.1.1

Ubuntu下装Apache后,有时候,会绑定的地址为 127.0.1.1。即提示信息:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
其实只要是 127.开头的都一样,都是回环地址。你随便访问一个127.* 都访问到的是本机。不过看起来总不爽,

解决方法:
sudo gedit /etc/apache2/apache2.conf

在文件最后面加上:
#Server Name
ServerName 127.0.0.1

参考资料:
apache绑定于127.0.1.1?疑惑
http://forum.ubuntu.org.cn/viewtopic.php?f=54&t=65851&start=0
Ubuntu下Apache重启错误:Could not reliably determin解决
http://www.oklinux.cn/html/network/ser/20090423/69802.html

原文地址:https://www.cnblogs.com/ghj1976/p/1775041.html