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   (这是操作系统默认安装路径)

apache服务器启动时提示httpd: apr_sockaddr_info_get() failed for的更多相关文章

  1. Apache启动提示 httpd: apr_sockaddr_info_get() failed for xxx

    httpd: apr_sockaddr_info_get() failed for xxx httpd: Could not reliably determine the server's fully ...

  2. Apache启动不了httpd: apr_sockaddr_info_get() failed xgp

    httpd: apr_sockaddr_info_get() failed for hoteel httpd: Could not reliably determine the server's fu ...

  3. Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错

    今天安装Apache httpd web服务器时,从官方网站上http://www.apache.org/dyn/closer.cgi下载httpd,然后在centos下解压,安装过程分为三部分: ( ...

  4. 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错

    今天在家里的RHLE5.5上安装apache的时候,先用user1用户./configure命令配置,然后才用root用户make && make install,结果apache起来 ...

  5. haproxy启动时提示失败

    haproxy启动时提示失败:[ALERT] 164/110030 (11606) : Starting proxy linuxyw.com: cannot bind socket 这个问题,其实就是 ...

  6. java中服务器启动时,执行定时任务

    package com.ripsoft.util; import java.util.Calendar; import java.util.Timer; import javax.servlet.Se ...

  7. httpd: apr_sockaddr_info_get() failed for bogon

    AH00557: httpd: apr_sockaddr_info_get() failed for bogon AH00558: httpd: Could not reliably determin ...

  8. [转帖]postgresql 在等待服务器启动时超时

    postgresql 在等待服务器启动时超时 2018年12月24日 :: my_name_nb 阅读数 版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接 ...

  9. SpringBoot启动时 提示没有主清单属性 MANIFEST

    SpringBoot启动时 提示没有主清单属性 MANIFEST <?xml version="1.0" encoding="UTF-8"?> &l ...

随机推荐

  1. golang中如何使用http,socket5代理

    Golang Http use socket5 proxy 因为最近想爬取一些网站上的视频,无奈网站在墙外,只能通过代理进行爬取,因此在网上搜索关于golang使用代理的方法. 功夫不负有心人,最后我 ...

  2. 【JavaScript】浅析javaScript和HTML与unicode字符集的关系

    目录结构: // contents structure [-] javaScript和HTML的字符集 javaScript和HTML如何表现unicode字符集 参考文章 javaScript和HT ...

  3. Ajax实现简单下拉选项

    基本都是固定步骤!主要在JAVASCRIPT和PHP中的操作 1.HTML代码里就只有两个SELECT标签如下: <select id="province"> < ...

  4. javascript DOM操作

    看到一个好的dom树.

  5. (转)TortoiseSVN与VisualSVN Server搭建SVN版本控制系统

    本片主要介绍如何搭建SVN版本控制系统,主要使用工具: 1 客户端:TortoiseSVN (小乌龟) 2 服务端:VisualSVN Server 搭建出图形化管理,以及右键菜单版本控制管理的SVN ...

  6. 基本动画CABasicAnimation - 完成之后闪回初始状态

    基本动画CABasicAnimation 结束之后,默认闪回初始状态,那怎么解决呢? position需要设备两个属性: // MARK: - 结束后不要闪回去 anim.removedOnCompl ...

  7. Nginx中文详解、配置部署及高并发优化

      一.Nginx常用命令: 1. 启动 Nginx          /usr/local/nginx/sbin/nginxpoechant@ubuntu:sudo ./sbin/nginx2. 停 ...

  8. 《ARC以及非ARC的讨论》

    ARC的机制是什么?它在那里放入retain/release函数调用? 请停止思考这些问题,把更多的精力放在下面的问题上,比如你的程序逻辑,对象的强,弱引用,对象的所属关系,可能的循环引用等问题上. ...

  9. 安装Cocoapods时候ERROR: While executing gem ... (Errno::EPERM)

    OS X 10.11 安装Cocoapods 出现问题的解决方法 今天尝试用 Cocoapods安装个第三方库.. 输入pod install, 发现 command not find. WTF! 估 ...

  10. jxl导入导出实例

    1 package com.tgb.test; 2 3 import java.io.File; 4 import java.io.IOException; 5 import java.util.Ar ...