Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
2015-05-14 09:58
656 查看
转载自:http://www.cnblogs.com/Anker/p/3355039.html
今天安装Apache httpd web服务器时,从官方网站上http://www.apache.org/dyn/closer.cgi下载httpd,然后在centos下解压,安装过程分为三部分:
(1)./configure
(2)make
(3)make install (需要root权限)
默认安装在/usr/sbin/下,执行apachectl start时候,提示如下错误:
httpd: apr_sockaddr_info_get() failed for shiwei
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
于是上网查了一下,根据前人的经验,问题终于解决了。总结一下,方便以后使用。
原因:这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName。所以apache会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。
解决办法:
(1)可以设定httpd.conf文件中的 ServerName,如下:ServerName localhost:80
(2)在 /etc/hosts 中填入自己的主机名称 bogon,如下:127.0.0.1 shiwei (用户名称)
参考网址:
http://suo.iteye.com/blog/1096296
http://blog.chinaunix.net/uid-21516619-id-1824989.html
http://blog.csdn.net/lyjtynet/article/details/4213173
今天安装Apache httpd web服务器时,从官方网站上http://www.apache.org/dyn/closer.cgi下载httpd,然后在centos下解压,安装过程分为三部分:
(1)./configure
(2)make
(3)make install (需要root权限)
默认安装在/usr/sbin/下,执行apachectl start时候,提示如下错误:
httpd: apr_sockaddr_info_get() failed for shiwei
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
于是上网查了一下,根据前人的经验,问题终于解决了。总结一下,方便以后使用。
原因:这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName。所以apache会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。
解决办法:
(1)可以设定httpd.conf文件中的 ServerName,如下:ServerName localhost:80
(2)在 /etc/hosts 中填入自己的主机名称 bogon,如下:127.0.0.1 shiwei (用户名称)
参考网址:
http://suo.iteye.com/blog/1096296
http://blog.chinaunix.net/uid-21516619-id-1824989.html
http://blog.csdn.net/lyjtynet/article/details/4213173
相关文章推荐
- Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- apache服务器启动时提示httpd: apr_sockaddr_info_get() failed for
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- apache启动时httpd: apr_sockaddr_info_get() failed for
- 启动apache报httpd: apr_sockaddr_info_get() failed for 103.localdomain错误问题
- apache 启动提示错误httpd: apr_sockaddr_info_get() failed for
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- httpd: apr_sockaddr_info_get() failed for apache 启动问题
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- 解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- apache服务器启动时提示httpd: apr_sockaddr_info_get() failed for
- Apache启动不了,httpd: apr_sockaddr_info_get() failed for apache 启动问题
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- APACHE服务启动时出现”httpd: apr_sockaddr_info_get() failed for“错误
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错