(EAI 8)hostname nor servname provided, or not…
2009-05-13 15:14:35来源:未知 阅读 ()
启动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
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Freebsd oracle 10g 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- 提示:bad kernel: arp : 内网IP地址 is on em0 but got rep 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- OpenBSD 4.5 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash