Restarting web server: apache2apache2: apr_sockaddr_info_get() failed for

重启Apache的时候提示:

[….] Restarting web server: apache2apache2: apr_sockaddr_info_get() failed for (none)
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
… waiting ……….apache2: apr_sockaddr_info_get() failed for (none)
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

解决办法:
打开 /etc/apache2/apache2.conf
在里面加入:

ServerName localhost

即可。
或者 打开 /etc/apache2/httpd.conf
在里面加入

ServerName localhost

然后重启服务器就ok了。

PS:其实这个只是警告没有配置默认主机名,可以不用理会的,如果你和我一样看不顺眼那警告信息,那就加个servername好了。