(EAI 8)hostname nor servname provided, or not…

2009-05-13 15:14:35来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


启动apache22的时候遇到了问题:
(EAI 8)hostname nor servname provided, or not known:
[url=javascript:;]mod_unique_id[/url]
: unable to find IPv4 address of"***.**.***"
这个警告是hostname的问题,hostname没有在网络上生效,会导致
[url=javascript:;]apache[/url]
无法正常
[url=javascript:;]启动[/url]
。解决的办法如下:
1:首先检查/etc/rc.conf里面hostname设置的是什么,/etc/resolv.confi里面设置的
[url=javascript:;]dns[/url]
是否能解析到该域名。
2:尝试:定义hostname为任意域名如example.com,或注释掉ServerName这一项。
3:尝试:定义hostname为localhost,定义httpd.conf的ServerName 127.0.0.1:80(但是这样定义会在安装
[url=javascript:;]mysql[/url]
的时候出点小问题,这里仅是提供下尝试的方法)
4:如果你没有固定ip和域名的话,最好
[url=javascript:;]安装[/url]
个花生壳程序弄个动态域名并将其作为hostname。
5:在httpd.conf 里注析掉 mod_unique_id就可以了,但是不推荐!这种为去除警告而禁用掉有效的功能模块的方法是不可取的。下面摘录的是官方关于mod_unique_id的解释,适用于apache1.3及以后版本。
Module mod_unique_id
This module provides an environment variable with a unique identifier for each request.(为每个请求生成唯一的标识以便跟踪)
Status:
Extension
Source File:
mod_unique_id.c
Module Identifier:
unique_id_module
Compatibility:
Available in Apache 1.3 and later.
Summary
This module provides a magic token for each request which is guaranteed to be unique across "all" requests under very specific conditions. The unique identifier is even unique across multiple machines in a properly configured cluster of machines. The environment variableUNIQUE_IDis set to the identifier for each request. Unique identifiers are useful for various reasons which are beyond the scope of this document.
Directives
This module has no directives.
Theory
First a brief recap of how the Apache server works on Unix machines. On Unix machines, Apache creates several children, the children process requests one at a time. Each child can serve multiple requests in its lifetime. For the purpose of this discussion, the children don't share any data with each other. We'll refer to the children as httpd processes.
Your website has one or more machines under your administrative control, together we'll call them a cluster of machines. Each machine can possibly run multiple instances of Apache. All of these collectively are considered "the universe", and with certain assumptions we'll show that in this universe we can generate unique identifiers for each request, without extensive communication between machines in the cluster.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Fedora 8 JDK Eclipse 的安装方法

下一篇:Squid请求处理的典型流程