If you get this error when starting Apache 2 here is the fix…

Performing sanity check on apache22 configuration:
httpd: apr_sockaddr_info_get() failed for
someserver1.host-name.net
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Starting apache22.
httpd: apr_sockaddr_info_get() failed for
someserver1.host-name.net
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

The repair is very easy, just fix your hosts file locate at `/etc/hosts`.

First, determing your hostname of the machine that you are on…

#> hostname
someserver1.host-name.net

Then open your hosts file…

#> vi /etc/hosts

Then change all the host items to match

::1 localhost.someserver1.host-name.net localhost
127.0.0.1 localhost.someserver1.host-name.net localhost
192.1.0.123 someserver1.host-name.netsomeserver1
192.1.0.123 someserver1.host-name.net.

Then start the server again…

#> apachectl start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
#> …

All set!!!

本日志由 flyinweb 于 2011-12-09 10:10:25 发表到 WEB服务器 中,目前已经被浏览 512 次,评论 0 次;

作者添加了以下标签: apr_sockaddr_info_get() failed