启动apache报httpd: apr_sockaddr_info_get() failed for 103.localdomain错误问题

在启动或重启apache时报以下错误,虽然没有影响,但总感觉怪怪的。
httpd: apr_sockaddr_info_get() failed for 103.localdomain
httpd: Could not reliably determine the server‘s fully qualified domain name, using 127.0.0.1 for ServerName

解决方法:

1)进入apache的安装目录:(视个人安装情况而不同)

/etc/httpd/conf/httpd.conf 
#ServerName www.example.com:80
ServerName localhost:80

2) vim /usr/local/apache2/conf/httpd.conf ,搜索”#ServerName”,添加ServerName localhost:80
#ServerName www.example.com:80
ServerName localhost:80
3)再重新启动apache 即可。
service httpd restart

/usr/local/apache2/bin/apachectl restart
/usr/local/apache2/bin/apachectl -t


本文出自 “zzfeng” 博客,请务必保留此出处http://zzfeng.blog.51cto.com/8155140/1618802

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。