apache启动报错 httpd: apr_sockaddr_info_get() failed for……

问题描述:apache服务虽启动成功,但启动时 报错 httpd: apr_sockaddr_info_get() failed for
 
[root@node0 ~]# /etc/init.d/httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for node0.example.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

[root@node0 ~]# /etc/init.d/httpd status
httpd (pid  2900) is running...

解决办法:配置DNS 或者 hosts文件中添加对apache服务器主机名的解析

[root@node0 ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.0.240    node0.example.com

问题解决!

[root@node0 ~]# /etc/init.d/httpd start
Starting httpd:                                            [  OK  ]

你可能感兴趣的:(apache启动报错)