我测试库里 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. 【剑指Offer】28、数组中出现次数超过一半的数字

      题目描述:   数组中有一个数字出现的次数超过数组长度的一半,请找出这个数字.   例如:输入如下所示的一个长度为9的数组{1,2,3,2,2,2,5,4,2}.由于数字2在数组中出现了5次,超过 ...

  2. PHP统计当前在线用户数实例

    HTML 我们在页面上放置一个显示当前在线人数的div#total以及一个用于展示访客地区分布的列表#onlinelist,默认我们在列表中放置一张与加载动画图片,后面我们用jQuery控制当鼠标滑向 ...

  3. 百度之星2014初赛 - 1002 - Grids

    先上题目: Grids Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Tota ...

  4. SIM300命令参考

    开机命令   AT+CFUN=1,1          //此命令可以开启simcom模块的大部分功能,一般在初始化模块的时候都要写上: AT&F                        ...

  5. 【ACM】poj_2092_Grandpa is Famous_201308021920

    Grandpa is FamousTime Limit: 2000MS  Memory Limit: 30000K Total Submissions: 7256  Accepted: 3670 De ...

  6. [bzoj1610][Usaco2008 Feb]Line连线游戏_暴力枚举

    Line连线游戏 bzoj-1610 Usaco-2008 Feb 题目大意:Farmer John最近发明了一个游戏,来考验自命不凡的贝茜.游戏开始的时 候,FJ会给贝茜一块画着N (2 <= ...

  7. Spring MVC-表单(Form)标签-密码框(Password)示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_password.htm 说明:示例基于Spring MVC 4.1.6. 以下示 ...

  8. Maven学习--------基础2

    继续学习Maven. 4.2 变量 1) 问:怎样使用变量替换?项目中的某个配置文件比方jdbc.properties使用了一些pom中的变量,怎样在公布中使用包括真实内容的终于结果文件? 答:使用资 ...

  9. 程序中的文件之沙盒以及plist文件的初步使用

    沙盒是相对于"应用程序"的文件,也就是相相应app所在的页面的文件. 每个应用都有自己的应用沙盒(应用沙盒就是文件系统文件夹).与其它文件系统隔离.应用必须呆在在积极的沙盒中.其它 ...

  10. 利用runtime动态生成对象?

    利用runtime我们能够动态生成对象.属性.方法这特性 假定我们要动态生成DYViewController,并为它创建属性propertyName 1)对象名 NSString *class = @ ...