Apache   发布时间:2022-05-11  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了linux Apache启动提示 httpd: apr_sockaddr_info_get() failed for apache大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

<div id="cnblogs_posT_Body">

httpd: apr_sockaddr_info_get() Failed for hoteelhttpd: Could not reliably determine the server's fully qualified domain name,using 127.0.0.1 for ServerName我在service httpd restart的时候提示上述信息的。然启动成功了,但是也是很郁闷的。这是因为我在配置DNS的时候hostname hoteel造成的。重新hostname localhost就可以了。我在网上找来一些有关这方面的信息,就顺便贴在这里了。1在启动 httpd 时出现StarTing httpd: httpd: apr_sockaddr_info_get() Failed for MYHOSThttpd: Could not reliably determine the server's fully qualified domain name,using 127.0.0.1 for ServerName.这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName 所以它会用主机上的名称来取代,首先会去找 /etc/hosts 中有没有主机的定义。所以要解决这个问题可以设定 ServerName 或者在 /etc/hosts 中填入自己的主机名称 MYHOST,像这样:>vi /etc/hosts127.0.0.1 localhost.localdomain localhost MYHOST

2在Linux下安装完Apache 2.2.6,启动http服务就报错,似乎不影响服务的使用,但是也挺别扭的。

[root@linux http]# ./apachectl starthttpd: apr_sockaddr_info_get() Failed for linux(在BSD上是apr_sockaddr_info_get() Failed for freebsdla)httpd: Could not reliably determine the server's fully qualified domain name,using 127.0.0.1 for ServerName

配置文件httpd.conf中关于hostname设置和/etc/sysconfig/network中的HOSTNAME设置不统一导致的,修改成统一的主机名即可解决该问题。

fig/network 默认主机名是:HOSTNAME=localhost.localdomain

 

 

 

 

 

 

 

 

大佬总结

以上是大佬教程为你收集整理的linux Apache启动提示 httpd: apr_sockaddr_info_get() failed for apache全部内容,希望文章能够帮你解决linux Apache启动提示 httpd: apr_sockaddr_info_get() failed for apache所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: