启动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


你可能感兴趣的:(server,service,localhost,determine)