httpd: apr_sockaddr_info_get() failedserver's fully qualified domain name 127.0.0.1 for ServerNa

简介:

http://www.cnblogs.com/Anker/p/3355039.html


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

      (1)./configure

      (2)make

      (3)make install (需要root权限)

默认安装在/usr/sbin/下,执行apachectl start时候,提示如下错误:

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

解决办法:

(1)可以设定httpd.conf文件中的 ServerName,如下:ServerName localhost:80                        

(2)在 /etc/hosts 中填入自己的主机名称 bogon,如下:127.0.0.1 shiwei (用户名称)

 


本文转自 zhangfang526 51CTO博客,原文链接:http://blog.51cto.com/zhangfang526/1709087


相关文章
|
2月前
|
监控
{"level":"warn","ts":"2023-11-07T00:35:53.400+0800","caller":"etcdserver/server.go:2048",&
{"level":"warn","ts":"2023-11-07T00:35:53.400+0800","caller":"etcdserver/server.go:2048",&
|
SQL druid Java
解决 ‘The last packet successfully received from the server was xxx milliseconds ago‘ 问题
解决 ‘The last packet successfully received from the server was xxx milliseconds ago‘ 问题
13237 0
|
Unix 应用服务中间件 nginx
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
999 0
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
flAbsPath on /var/lib/dpkg/status failed - realpath
flAbsPath on /var/lib/dpkg/status failed - realpath
111 0
|
Linux 网络架构
Root-NFS: Unable to get mountd port number from server, using default
问题描述:         以前下载到开发板linux内核启动好好地,今天突然启动不了了,到达Root-NFS: Unable to get mountd port number from server, using default这个位置就停住了,过了一段时间就显示,如图:       很明显,我的nfs有问题。
1462 0