<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[Apache启动不了,httpd: apr_sockaddr_info_get() failed for apache 启动问题]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Wed, 16 Jun 2010 04:07:13 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	httpd: apr_sockaddr_info_get() failed for hoteel<br/>httpd: Could not reliably determine the server&#039;s fully qualified domain name, using 127.0.0.1 for ServerName<br/>我在service httpd restart的时候提示上述信息的。虽然启动成功了，但是也是很郁闷的。<br/>这是因为我在配置DNS的时候hostname hoteel造成的。<br/>重新hostname localhost就可以了。<br/>我在网上找来一些有关这方面的信息，就顺便贴在这里了。<br/>1<br/>在启动 httpd 时出现<br/>Starting httpd: httpd: apr_sockaddr_info_get() failed for MYHOST<br/>httpd: Could not reliably determine the server&#039;s fully qualified domain name, using 127.0.0.1 for ServerName.<br/>这个问题应该是没有在 /etc/httpd/conf/httpd.conf 中设定 ServerName 所以它会用主机上的名称来取代，首先会去找 /etc/hosts 中有没有主机的定义。<br/>所以要解决这个问题可以设定 ServerName 或者在 /etc/hosts 中填入自己的主机名称 MYHOST，像这样：<br/>&gt;vi /etc/hosts<br/>127.0.0.1 localhost.localdomain localhost MYHOST<br/><br/>2<br/>在Linux下安装完Apache 2.2.6，启动HTTP服务就报错，似乎不影响服务的使用，但是也挺别扭的。<br/><br/>[root@linux http]# ./apachectl start<br/>httpd: apr_sockaddr_info_get() failed for linux(在BSD上是apr_sockaddr_info_get() failed for freebsdla)<br/>httpd: Could not reliably determine the server&#039;s fully qualified domain name, using 127.0.0.1 for ServerName<br/><br/>经分析发现是apache的conf目录下的配置文件httpd.conf中关于hostname设置和/etc/sysconfig/network中的HOSTNAME设置不统一导致的，修改成统一的主机名即可解决该问题。<br/><br/>注：/etc/sysconfig/network 默认主机名是：HOSTNAME=localhost.localdomain<br/><br/>PS：网上有这种办法，似乎是没用的，因为我认为apache在编译安装过程中会编译ARP的，因此下述操作有点多余。<br/><br/>apr 和apr-util包含在Apache httpd的发行源代码中，并且在绝大多数情况下使用都不会出现问题。当然，如果apr或apr-util的1.0或1.1版本已经安装在你的系统中了，则必须将你的apr/apr-util升级到1.2版本，或者将httpd单独分开编译。要使用发行源代码中自带的apr/apr-util源代码进行安装，你必须手动完成：<br/><br/># 编译和安装 apr 1.2<br/><br/>apr<br/>./configure --prefix=/x/httpd/apr<br/>make<br/>make install<br/><br/>apr-util<br/>./configure --prefix=/x/httpd/apr_util --with-apr=/x/httpd/apr<br/>make<br/>make install<br/><br/>apache<br/>./configure --prefix=/x/httpd/apache2 &#92;<br/>--enable-so &#92;<br/>--enable-cgi &#92;<br/>--enable-rewrite &#92;<br/>--enable-mods-shared=all &#92;<br/>--with-apr=/x/httpd/apr &#92;<br/>--with-apr-util=/x/httpd/apr_util<br/><br/>LDFLAGS=&quot;-L/usr/lib64 -L/lib64&quot;<br/><br/><br/><br/><div class="code">root@AD39_117_sles10:/etc/opt/CollabNet_Subversion/conf# /opt/CollabNet_Subversion/bin/httpd<br/>httpd: apr_sockaddr_info_get() failed for AD39_117_sles10<br/>httpd: Could not reliably determine the server&#039;s fully qualified domain name, using 127.0.0.1 for ServerName<br/>no listening sockets available, shutting down<br/>Unable to open logs</div><br/><br/>pache不能启动： Unable to open logs<br/>很难从给出的信息中发现有用的东西，<br/>让你不知道是哪除了问题，幸好通常你不会是第一个碰到这个问题的人，又幸好有google。<br/>今天一开机，Apache就不能启动了，结果在Event Viewer中看到说： Unable to open logs<br/>不知道是什么意思。<br/>经过一番搜索，才知道，如果Apache默认的80端口被占用才会报这个错，<br/>只是不明白Apache为什么不直接告诉我：80端口被占用。<br/>解决的办法很简单：<br/>用netstat -ano查看Local Address中Listening 80的应用的PID, 去任务管理器中找到对应的进程，关闭此进程即可。<br/>我这边发现的进程居然是一个叫pear.exe的进程占了，也不知道它监听80端口干嘛，看起来有点古怪。<br/><br/><br/><br/>来源：http://hi.baidu.com/sunnyzhishui/blog/item/11cf7b0611c5a67d0308817a.html
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] Apache启动不了,httpd: apr_sockaddr_info_get() failed for apache 启动问题]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>