我测试库里 service httpd start 时报 下面错误

httpd: apr_sockaddr_info_get() failed for fengxin.wzjzt.centos
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 中有没有主机的定义。

所以要解决这个问题可以设定httpd.conf文件中的 ServerName,如下:

(1) ServerName localhost:80

或者在 /etc/hosts 中填入自己的主机名称 bogon,如下:

(2)127.0.0.1 bogon

注意:

当前系统的主机名请以hostname命令为准,/etc/sysconfig/network中的HOSTNAME设置有可能不一致。

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

解决启动httpd报: apr_sockaddr_info_get() failed for错误的更多相关文章

  1. win7 LR11.0 启动controller报:Failed to create Online:无效指针

    win7 LR11.0 启动controller报:Failed to create Online:无效指针 运行lr setup.exe 进行修复后问题解决 修复完成后,覆盖lr安装目录“bin”文 ...

  2. 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法

    我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...

  3. 启动Myeclipse报错“Failed to create the Java Virtual Machine”的解决办法

    我安装的是Myeclipse 10.7.1.装上好久没用,今天启动突然报错:Failed to create the Java Virtual Machine. 检查Myeclipse安装好使用时好的 ...

  4. Centos6 下启动httpd报错 Could not reliably determine the server's解决方法

    在启动httpd的时候报错: 修改/etc/httpd/conf/httpd.conf 配置,去掉ServerName 前的#(或者手动添加ServerName localhost:80)然后重启ht ...

  5. mac 启动php-fpm报错 failed to open configuration file '/private/etc/php-fpm.conf': No such file or direc

    直接运行,有报错找不到配置文件. $ php-fpm [11-Jan-2014 16:03:03] ERROR: failed to open configuration file '/private ...

  6. 解决npm 的 shasum check failed for错误

    使用npm安装一些包失败,类似如下报错情况:   C:\Program Files\nodejs>npm update npm npm ERR! Windows_NT 10.0.14393 np ...

  7. 使用elasticsearch启动项目报错failed to load elasticsearch nodes 。。。。。No type specified for field [name]

    failed to load elasticsearch nodes .....No type specified for field [name]翻译: 加载ElasticSearch节点失败... ...

  8. 启动docker报错Failed to listen on Docker Socket for the API.

    1.启动时报错查看日志发现 # journalctl -xe Failed to listen on Docker Socket for the API. 查找socket这个配置文件,修改如下 # ...

  9. NC 解决启动环境报内存溢出问题

    java heap space 内存溢出 解决方法如下: 在eclipse中,window-->preferences-->Java-->Installed JREs选中JRE 点击 ...

随机推荐

  1. salt 根据ip修改主机名

    首先定义pillar [root@web1 pillar]# cat hostname.sls ip_hostname: 10.1.1.1: web1 10.1.1.2: web2 10.1.1.3: ...

  2. javascript正则表达式总结(test|match|search|replace|split|exec)

    test:测试string是否包含有匹配结果,包含返回true,不包含返回false. <script type="text/javascript"> var str ...

  3. js给对象onclick事件赋值

    1)当方法没有参数时,赋值可以直接用onclick = 方法名 window.onload = function() { $('btnTest').onclick = test; } function ...

  4. WEB测试范围小结

    根据<用户需求说明手册>和<需求分析说明书>,分析各个功能模块.针对各个功能模块进行相关功能的测试. 链接测试 链接是Web 网站的一个主要特征,它是在页面之间切换和引导用户去 ...

  5. Disruptor使用

    Disruptor作者,介绍Disruptor能每秒处理600万订单.这是一个可怕的数字. disruptor之所以那么快,是因为内部采用环形队列和无锁设计.使用cas来进行并发控制.通过获取可用下标 ...

  6. rsync在windows下的安装和配置

    rsync分为服务器端和客户端,以A(服务器端),B(客户端)2台服务器为例 A的IP地址为192.168.1.111 B的ip地址为192.168.1.1231, 先配置服务器端,在服务器上安装cw ...

  7. 洛谷 P2728 纺车的轮子 Spinning Wheels

    P2728 纺车的轮子 Spinning Wheels 题目背景 一架纺车有五个纺轮(也就是五个同心圆),这五个不透明的轮子边缘上都有一些缺口.这些缺口必须被迅速而准确地排列好.每个轮子都有一个起始标 ...

  8. UVA 10173

    bitch bitch bitch... TLE,WA一大坨,我是在拿生命来JUDGE啊.. 不得不说,UVA上的数据根本不是随机的,而是有预谋的. for(int i=2;i<n;i++){ ...

  9. linux虚拟机网络设置(本机使用公司内网)

    使用桥接方式 设置: 一开始没有的话可以add 编辑edit 参考公司网络,下图是公司内网地址 然后设置 然后ping就ok了

  10. JVM —— Java 对象占用空间大小计算

    零. 为什么要知道 Java 对象占用空间大小 缓存的实现: 在设计 JVM 内缓存时(不是借助 Memcached. Redis 等), 须要知道缓存的对象是否会超过 JVM 最大堆限制, 假设会超 ...