apache服务器启动时提示httpd: apr_sockaddr_info_get() failed for
2012-11-09 09:22
507 查看
apache服务器启动时提示httpd: apr_sockaddr_info_get() failed for
在RedHat linux 5 与 CentOS 5服务器上配置好apache后,启动或者关闭时总要报个错:
httpd: apr_sockaddr_info_get() failed for XX(主机名)
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
虽然说并不影响apache的正常启动!但总感觉好像哪有问题。因为进程里会卡一个apache启动进程
找了下资料,原来是主机名设置不对造成的!没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName 所以它会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。
所以要解决这个问题可以设定 ServerName 或者在 /etc/hosts 中填入自己的主机名称 MYHOST,像这样:
>vi /etc/hosts
127.0.0.1 localhost.localdomain localhost XX(主机名)
查看主机名的命令是:hostname
可能出现的另外的错误:
[root@bogon xy]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for bogon
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
解决方法:
将httpd.conf中的ServerName 前面的 # 去掉。
RedHat 5 与 CentOS 中的配置文件在 /etc/httpd/conf/httpd.conf (这是操作系统默认安装路径)
在RedHat linux 5 与 CentOS 5服务器上配置好apache后,启动或者关闭时总要报个错:
httpd: apr_sockaddr_info_get() failed for XX(主机名)
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
虽然说并不影响apache的正常启动!但总感觉好像哪有问题。因为进程里会卡一个apache启动进程
找了下资料,原来是主机名设置不对造成的!没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName 所以它会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。
所以要解决这个问题可以设定 ServerName 或者在 /etc/hosts 中填入自己的主机名称 MYHOST,像这样:
>vi /etc/hosts
127.0.0.1 localhost.localdomain localhost XX(主机名)
查看主机名的命令是:hostname
可能出现的另外的错误:
[root@bogon xy]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for bogon
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
解决方法:
将httpd.conf中的ServerName 前面的 # 去掉。
RedHat 5 与 CentOS 中的配置文件在 /etc/httpd/conf/httpd.conf (这是操作系统默认安装路径)
相关文章推荐
- 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 xxx
- apache启动报错 httpd: apr_sockaddr_info_get() failed for
- Apache启动不了,httpd: apr_sockaddr_info_get() failed for apache 启动问题
- 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 apache 启动问题
- 如何解决linux下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 报错
- 如何解决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 报错
- Apache启动提示 httpd: apr_sockaddr_info_get() failed for xxx
- 如何解决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“错误
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错