<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>某人的栖息地 &#187; apache</title>
	<atom:link href="http://www.ooso.net/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ooso.net</link>
	<description>Linux + Apache + Mysql + Php + Flash</description>
	<lastBuildDate>Sat, 07 Aug 2010 00:23:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>apache的RewriteMap使用心得</title>
		<link>http://www.ooso.net/archives/493</link>
		<comments>http://www.ooso.net/archives/493#comments</comments>
		<pubDate>Thu, 02 Apr 2009 13:57:47 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.ooso.net/?p=493</guid>
		<description><![CDATA[在apache的环境下，rewrite还真是生活之友啊，时不时就得用上。前些日子有个需求，要将url重新转一转。
什么情况？
原来的url
http://www.xxx.com/demo/oldpage.php?param1=1&#038;param2=2

				<span class="readmore"><a href="http://www.ooso.net/archives/493" title="apache的RewriteMap使用心得">阅读全文（1250字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>在apache的环境下，rewrite还真是生活之友啊，时不时就得用上。前些日子有个需求，要将url重新转一转。</p>
<h2>什么情况？</h2>
<p>原来的url</p>
<p>http://www.xxx.com<b>/demo/oldpage.php?param1=1&#038;param2=2</b></p>
<p>转换后的url</p>
<p>http://www.xxx.com/newpage.php?url=<b>%2Fdemo%2Fmypage.php%3Fparam1%3D1&#038;param2%3D2</b></p>
<p>需要把粗体部分的url进行urlencode，能看出上面的字符"?&#038;="都分别转义过，作为参数发给另外一个url。那么这时候请出rewrite还真是最合适不过了。</p>
<h2>坎坷的Rewrite经历</h2>
<p>查查rewrite手册，俺这才知道，转义这活，非得派出<a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#mapfunc">RewriteMap的map function</a>才能做的比较漂亮。现在只有四个内部map function可供差遣： </p>
<ul>
<li>toupper: Converts the key to all upper case.</li>
<li>tolower: Converts the key to all lower case.</li>
<li>escape: Translates special characters in the key to hex-encodings.</li>
<li>unescape: Translates hex-encodings in the key back to special characters.</li>
</ul>
<p>那么很快就有了第一个rewrite出现：<br />
<code><br />
RewriteMap escape int:escape<br />
RewriteRule ^/([^/]*)$ /newpage.php?mi_url_suffix=${escape:$1?%{QUERY_STRING}} [L,PT]<br />
</code></p>
<p>注：这里的int不是intger的意思，它是internal的缩写，表示调用内部函数。</p>
<p>看上去非常简单，跑起来貌似也正....常？且慢，俺打开RewriteLog一瞅，形式不容乐观啊，"&#038;"字符通通没有转义。看来是失败了，爬到狗狗上翻了一下，貌似escape对"?="之类的特殊字符是不做转义的，晕。</p>
<h2>RewriteMap到底</h2>
<p>接着细看apache的rewrite手册，发现RewriteMap还支持自定义脚本，那么还得使出俺的看家绝技——php了。首先弄一个能转义的php，必须非常简单，复杂了apache容易挂掉，写出来发现想复杂都挺难啊：</p>
<p>/usr/local/bin/escape.php</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showCodeTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000; font-style:italic;">#!/usr/bin/php -f</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$in</span> = <span style="color:#000066;">trim</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#000066;">fgets</span><span style="color:#006600; font-weight:bold;">&#40;</span>STDIN<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#000066;">fputs</span><span style="color:#006600; font-weight:bold;">&#40;</span>STDOUT, <span style="color:#000066;">urlencode</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$in</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\r</span><span style="color:#000099; font-weight:bold;">\n</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>在这个脚本里可别使用php:://stdin之类的，具体原因查<a href="/category/php">php</a>手册。相应的，rewrite规则如下：<br />
<code><br />
RewriteMap escape prg:/usr/local/bin/escape.php<br />
RewriteRule ^/([^/]*)$ /newpage.php?mi_url_suffix=${escape:$1?%{QUERY_STRING}} [L,PT]<br />
</code></p>
<p>rewrite规则没有太大的改变，prg表示使用自定义脚本。现在这个版本总算正常运作了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/493/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ubuntu下安装php5 + pdo</title>
		<link>http://www.ooso.net/archives/272</link>
		<comments>http://www.ooso.net/archives/272#comments</comments>
		<pubDate>Tue, 16 Jan 2007 23:11:16 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[pdo]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/272</guid>
		<description><![CDATA[这几天尝试把工作机迁到ubuntu上来做开发,系统安装好之后的首要任务是安装php+mysql的开发环境. 我打算直接安装php5, pdo_mysql, 下面是安装过程的记录
首先我直接用apt-get安装了apache2,php5,pear以及mysql5, 为了方便后续的安装,还加上了make和libmysqlclient

sudo apt-get install apache2-mpm-prefork

				<span class="readmore"><a href="http://www.ooso.net/archives/272" title="ubuntu下安装php5 + pdo">阅读全文（912字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>这几天尝试把工作机迁到ubuntu上来做开发,系统安装好之后的首要任务是安装php+<a href="http://www.ooso.net/index.php/archives/category/mysql/">mysql</a>的开发环境. 我打算直接安装<a href="http://www.ooso.net/?tag=php5">php5</a>, pdo_mysql, 下面是安装过程的记录</p>
<p>首先我直接用apt-get安装了<a href="http://www.ooso.net/?tag=apache">apache2</a>,php5,pear以及mysql5, 为了方便后续的安装,还加上了make和libmysqlclient</p>
<ul>
<li>sudo apt-get install apache2-mpm-prefork</li>
<li>sudo apt-get install php5</li>
<li>sudo apt-get install php5-dev</li>
<li>sudo apt-get install php5-pear</li>
<li>sudo apt-get install mysql-server-5.0</li>
<li>sudo apt-get install make</li>
<li>sudo apt-get install libmysqlclient15-dev</li>
</ul>
<p>pdo在ubuntu的apt里头似乎还找不到安装源,所以通过pecl来安装这个扩展,非常简单 ---- 如果海底光纤能连通的话:</p>
<blockquote><p>pecl install pdo</p></blockquote>
<p>增加一行:</p>
<blockquote><p>extension=pdo.so</p></blockquote>
<p>到文件:</p>
<blockquote><p>/etc/php/apache2/php.ini<br />
/etc/php/cli/php.ini</p></blockquote>
<p>接下来安装pdo_mysql碰到一些问题, 直接跑pecl install pecl_mysql会出现一些错误,搜索了一下发现是pecl本身的问题,下面是个比较简单的解决办法:</p>
<blockquote><p>
wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz<br />
tar xzvf PDO_MYSQL-1.0.2.tgz<br />
cd PDO_MYSQL-1.0.2</p></blockquote>
<p>注释掉configure里头判断是否已经安装pdo扩展的代码片段,继续跑:</p>
<blockquote><p>
phpize<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>然后再次添加下面一行到前面提到的两个php.ini</p>
<blockquote><p>extension=pdo_mysql.so</p></blockquote>
<p>重启apache之后,  php5 + pdo_mysql就在ubuntu上安装好了, documentroot是/var/www</p>
<h3>后记</h3>
<p>更简单的解决办法是运行:</p>
<blockquote><p>PHP_PDO_SHARED=1 pecl install pdo_mysql</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/272/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>http_load的使用</title>
		<link>http://www.ooso.net/archives/219</link>
		<comments>http://www.ooso.net/archives/219#comments</comments>
		<pubDate>Wed, 09 Aug 2006 23:50:16 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[优化]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/219</guid>
		<description><![CDATA[记得前些天介绍了一个幻灯——Getting Rich with PHP 5(IE之外的浏览器可看,见用php5来赚大钱)，这个幻灯向我们展示了php程序优化的一些技巧，其中命令行工具http_load给我留下很深的印象，这工具看上去和apache的ab很相似，用来做网站的压力测试。昨天在服务器上安装http_load并试用了一段时间，下面是我的一点学习心得。
测试网站每秒所能承受的平均访问量
http_load -parallel 5 -fetches 1000 urls.txt
这段命令行是同时使用5个进程，随机访问urls.txt中的网址列表，总共访问1000次。运行之后的结果：

				<span class="readmore"><a href="http://www.ooso.net/archives/219" title="http_load的使用">阅读全文（673字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>记得前些天介绍了一个幻灯——<a href="http://talks.php.net/show/oscon06">Getting Rich with PHP 5</a>(IE之外的浏览器可看,见<a href="http://www.ooso.net/index.php/archives/210">用php5来赚大钱</a>)，这个幻灯向我们展示了php程序优化的一些技巧，其中命令行工具<a href="http://www.acme.com/software/http_load/">http_load</a>给我留下很深的印象，这工具看上去和<a href="http://www.ooso.net/?tag=apache">apache</a>的ab很相似，用来做网站的压力测试。昨天在服务器上安装http_load并试用了一段时间，下面是我的一点学习心得。</p>
<h3>测试网站每秒所能承受的平均访问量</h3>
<p><code>http_load -parallel 5 -fetches 1000 urls.txt</code><br />
这段命令行是同时使用5个进程，随机访问urls.txt中的网址列表，总共访问1000次。运行之后的结果：</p>
<blockquote><p>1000 fetches, 5 max parallel, 6e+06 bytes, in 58.1026 seconds<br />
6000 mean bytes/connection<br />
<strong>17.2109 fetches/sec</strong>, 103266 bytes/sec<br />
msecs/connect: 0.403263 mean, 68.603 max, 0.194 min<br />
msecs/first-response: 284.133 mean, 5410.13 max, 55.735 min<br />
HTTP response codes:<br />
  code 200 -- 1000</p></blockquote>
<p>从上面的运行结果来看，目标网站仅仅能够承受每秒17次访问，不够强壮。</p>
<h3>测试网站是否能承受住预期的访问压力</h3>
<p><code>http_load -rate 2 -seconds 300 urls.txt</code><br />
在300秒内保持一定的频率访问目标url。</p>
<p><strong>注:</strong></p>
<ul>
<li>urls.txt保存要访问的url列表，每行一个</li>
<li>不要测试上线之后的网站，压垮了可不好玩</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/219/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用php简单实现Search Engine Friendly的URL</title>
		<link>http://www.ooso.net/archives/174</link>
		<comments>http://www.ooso.net/archives/174#comments</comments>
		<pubDate>Tue, 28 Mar 2006 04:03:04 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/174</guid>
		<description><![CDATA[上次写了Search Engine Friendly的URL设计 - 俺在这个事上面折腾,要实现这个 http://www.myhost.com/foo.php?a=A&#038;b=B&#038;c=C -> http://www.myhost.com/foo.php/a/A/b/B/c/C的url转换,实际上还有不同的办法.
比如说我用的是虚拟主机,也想实现url优化,但是我没有服务器权限,这时候可以从PATH_INFO来下手.
访问http://www.myhost.com/foo.php/a/A/b/B/c/C这个url的时候,如果apache的AllowPathinfo已经打开,用php访问$_SERVER['PATH_INFO']可以获得a/A/b/B/c/C这串字符 这时候再用php加以解析:

				<span class="readmore"><a href="http://www.ooso.net/archives/174" title="用php简单实现Search Engine Friendly的URL">阅读全文（663字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>上次写了<a title="Permanent link toSearch Engine Friendly的URL设计 - 俺在这个事上面折腾" href="http://www.ooso.net/index.php/archives/170">Search Engine Friendly的URL设计 - 俺在这个事上面折腾</a>,要实现这个 http://www.myhost.com/foo.php?a=A&#038;b=B&#038;c=C -> http://www.myhost.com/foo.php/a/A/b/B/c/C的url转换,实际上还有不同的办法.</p>
<p>比如说我用的是虚拟主机,也想实现url优化,但是我没有服务器权限,这时候可以从PATH_INFO来下手.</p>
<p>访问http://www.myhost.com/foo.php/a/A/b/B/c/C这个url的时候,如果apache的AllowPathinfo已经打开,用php访问$_SERVER['PATH_INFO']可以获得a/A/b/B/c/C这串字符 这时候再用php加以解析:</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showCodeTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#000066;">empty</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'PATH_INFO'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color:#0000FF;">$paths</span> = <span style="color:#000066;">explode</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'/'</span>, <span style="color:#000066;">substr</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_SERVER</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'PATH_INFO'</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color:#616100;">for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span> = <span style="color:#CC66CC;color:#800000;">0</span>, <span style="color:#0000FF;">$cnt</span> = <span style="color:#000066;">count</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$paths</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#0000FF;">$i</span> &lt;<span style="color:#0000FF;">$cnt</span>; <span style="color:#0000FF;">$i</span>++<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">  <span style="color:#0000FF;">$_GET</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#0000FF;">$paths</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#0000FF;">$i</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = @<span style="color:#006600; font-weight:bold;">&#40;</span>string<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#0000FF;">$paths</span><span style="color:#006600; font-weight:bold;">&#91;</span>++<span style="color:#0000FF;">$i</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>这样就可以简单的将PATH_INFO转换为全局的$_GET数组,这样还有个好处</p>
<li><a href="http://www.myhost.com/foo.php?a=A&#038;b=B&#038;c=C">http://www.myhost.com/foo.php?a=A&#038;b=B&#038;c=C</a>
<li><a href="http://www.myhost.com/foo.php/a/A/b/B/c/C">http://www.myhost.com/foo.php/a/A/b/B/c/C</a></li>
<p>上面的url同时可以访问,保证了通用性 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/174/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>php + xapian extension的安装</title>
		<link>http://www.ooso.net/archives/173</link>
		<comments>http://www.ooso.net/archives/173#comments</comments>
		<pubDate>Tue, 28 Mar 2006 01:17:12 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/173</guid>
		<description><![CDATA[版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
xapian是啥玩意?
xapian 是一个“Xapian 是一个开源概率论信息检索库，基于GPL发布。它是用C++编写的，提供的绑定可以支持其它语言(支持Perl, Python, PHP, Java, and TCL )的开发。 Xapian 设计为一个高度可适应的工具集，可以让开发人员方便地为他们自己的应用程序增加高级索引和搜索功能。”
在网上找到这段介绍后,俺手痒痒就想试试xapian ---- 一定要给php整个这东东上去.参考了若干文档以后,这就开始动手了(我的环境仍然是freebsd + apache 2.2 + php 5.1.2,apache和php原来就已经安装好):

				<span class="readmore"><a href="http://www.ooso.net/archives/173" title="php + xapian extension的安装">阅读全文（1169字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明</strong></p>
<p><a href="http://www.xapian.org" target="_blank">xapian</a>是啥玩意?</p>
<p>xapian 是一个“Xapian 是一个开源概率论信息检索库，基于GPL发布。它是用C++编写的，提供的绑定可以支持其它语言(支持Perl, Python, <a href="http://www.ooso.net/index.php/archives/category/php/">PHP</a>, Java, and TCL )的开发。 Xapian 设计为一个高度可适应的工具集，可以让开发人员方便地为他们自己的应用程序增加高级索引和搜索功能。”</p>
<p>在网上找到这段介绍后,俺手痒痒就想试试xapian ---- 一定要给php整个这东东上去.参考了若干文档以后,这就开始动手了(我的环境仍然是freebsd + <a href="http://httpd.apache.org" target="_blank">apache</a> 2.2 + <a href="http://www.php.net" target="_blank">php</a> 5.1.2,apache和php原来就已经安装好):</p>
<p>1.下载xapian</p>
<blockquote><p>cd /usr/local/src<br />
wget <a href="http://www.oligarchy.co.uk/xapian/0.9.4/xapian-core-0.9.4.tar.gz">http://www.oligarchy.co.uk/xapian/0.9.4/xapian-core-0.9.4.tar.gz</a><br />
wget <a href="http://www.oligarchy.co.uk/xapian/0.9.4/xapian-bindings-0.9.4.tar.gz">http://www.oligarchy.co.uk/xapian/0.9.4/xapian-bindings-0.9.4.tar.gz</a></p></blockquote>
<p>前者是xapian的核心lib代码,后者是给其它语言调用的接口</p>
<p>2.安装Xapian-core</p>
<blockquote><p>cd /usr/local/src<br />
tar xzvf xapian-core-0.9.4.tar.gz<br />
cd xapian-core-0.9.4<br />
./configure --prefix=/usr/local/xapian<br />
make<br />
make install</p></blockquote>
<p>3.安装Xapian-bindings</p>
<blockquote><p>cd /usr/local/src<br />
tar xzvf xapian-bindings-0.9.4.tar.gz<br />
cd xapian-bindings-0.9.4<br />
ln -s /usr/local/xapian/bin/xapian-config /usr/local/bin/xapian-config #这里需要做个软连接,编译的时候需要用到<br />
./configure --without-python #我没用到python,就不编译了<br />
make<br />
make install</p></blockquote>
<p>进行到这一步,Xapian-bindings应该算是安装好了,但是不知道为何,编译好的xapian.so没有按说明文档所说的自动复制到php的extension目录,于是我手工完成这一步骤</p>
<blockquote><p>cp php/.libs/xapian.so /usr/local/lib/php #/usr/local/lib/php是我在php.ini设置的extension目录</p></blockquote>
<p>然后修改php.ini<br />
extension_dir = "/usr/local/lib/php/" #没有就加上<br />
extension=xapian.so</p>
<p>安装全部完成,重启<a href="http://www.ooso.net/?tag=apache">apache</a>看看phpinfo:<br />
<img title="php + xapian extension" alt="php + xapian extension" src="http://www.ooso.net/images/blog/xapian.gif" /><br />
一切ok:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/173/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>php + clucene extension的安装</title>
		<link>http://www.ooso.net/archives/171</link>
		<comments>http://www.ooso.net/archives/171#comments</comments>
		<pubDate>Wed, 22 Mar 2006 06:28:45 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/171</guid>
		<description><![CDATA[版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
CLucene是SF上面的一个对Lucene(一个用Java写的全文检索引擎工具包)的移植,做为Lucene的C++的重新实现，以带来更快的检索速度,但是一直还不stable.这里仅仅是尝试php+clucene扩展的安装,具体应用先不管.
安装环境:
Freebsd 6.0 + apache 2.2 + php 5.1.2

				<span class="readmore"><a href="http://www.ooso.net/archives/171" title="php + clucene extension的安装">阅读全文（1095字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明</strong></p>
<p><a href="http://clucene.sourceforge.net" target="_blank">CLucene</a>是<a href="http://www.sf.net" target="_blank">SF</a>上面的一个对<a href="http://lucene.apache.org/" target="_blank">Lucene</a>(一个用Java写的全文检索引擎工具包)的移植,做为Lucene的C++的重新实现，以带来更快的检索速度,但是一直还不stable.这里仅仅是尝试<a href="http://www.ooso.net/index.php/archives/category/php/">php</a>+<a href="http://pecl.php.net/package/clucene">clucene扩展</a>的安装,具体应用先不管.</p>
<p>安装环境:<br />
Freebsd 6.0 + <a href="http://www.ooso.net/?tag=apache">apache </a>2.2 + php 5.1.2</p>
<p><a href="http://www.ooso.net/article/html/install.htm" target="_blank">apache+php的安装</a>就不说了,网上一抓一大把,注意clucene扩展必须在php5以上才能安装.</p>
<ul>
<li>首先安装clucene</li>
</ul>
<p>1.下载clucene<br />
直奔它的首页--<a href="http://clucene.sourceforge.net" target="_blank">clucene.sourceforge.net</a>,下载clucene 0.9.10<br />
2.编译clucene</p>
<blockquote></blockquote>
<blockquote><p>
tar xzvf clucene-0.9.10.tar.gz<br />
cd clucene-0.9.10<br />
./autogen.sh<br />
./configure<br />
make</p></blockquote>
<p>这样clucene就安装好了,为了让其它程序可以调用clucene,这里把编译好的lib放到系统lib目录下</p>
<blockquote><p>cp src/.libs/libclucene.* /usr/local/lib<br />
cp src/CLucene.h /usr/local/include/<br />
cp -r src/CLucene /usr/local/include/</p></blockquote>
<ul>
<li>安装clucene php extension</li>
</ul>
<p>1.下载clucene php extension<br />
在pecl.php.net有下载,拖回来就是<br />
<a href="http://pecl.php.net/package/clucene">http://pecl.php.net/package/clucene</a></p>
<p>2.编译clucene php extension</p>
<blockquote><p>tar xzvf clucene-0.0.9.tgz<br />
cd clucene-0.0.9<br />
cp -r /usr/local/include/Clucene include/  #编译时要把clucene的include文件弄一份<br />
cp -r /usr/local/include/Clucene.h include/ <br />
phpize<br />
./configure<br />
make</p></blockquote>
<p>编译完成,这里会生成一个clucene.so,我们把它放在php的extension目录下(没有就建一个),然后修改php.ini</p>
<p>加入<br />
extension=clucene.so</p>
<p>重启apache之后看phpinfo</p>
<p><img title="php+clucene" alt="php+clucene" src="http://www.ooso.net/images/blog/clucene.gif" /></p>
<p>至此安装就算完成了,demo嘛在examples目录下有一个,命令行调用方式(根据已有的index检索):<br />
php clucene.php "Your query"</p>
<p>BTW:新出的<a href="http://framework.zend.com" target="_blank">zend framework</a>也有lucene模块,但是功能还不完善,现在0.1.2好像只能建立索引,检索功能尚在开发中</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/171/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Engine Friendly的URL设计 &#8211; 俺在这个事上面折腾</title>
		<link>http://www.ooso.net/archives/170</link>
		<comments>http://www.ooso.net/archives/170#comments</comments>
		<pubDate>Thu, 16 Mar 2006 03:23:38 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/170</guid>
		<description><![CDATA[最近的某个项目需要配合seo,改进php动态页面的url,这里首先参考了车东的
如何提高在Google中的排名(3) —— Search Engine Friendly的URL设计
其中有一段url rewrite的例子比较符合要求且改动最少:
一个更通用的能够将所有的动态页面进行参数映射的表达式是：

				<span class="readmore"><a href="http://www.ooso.net/archives/170" title="Search Engine Friendly的URL设计 &#8211; 俺在这个事上面折腾">阅读全文（846字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>最近的某个项目需要配合seo,改进php动态页面的url,这里首先参考了车东的<br />
<a href="http://www.chedong.com/tech/google_url.html" target="_blank">如何提高在Google中的排名(3) —— Search Engine Friendly的URL设计</a></p>
<p>其中有一段url rewrite的例子比较符合要求且改动最少:</p>
<blockquote><p><em>一个更通用的能够将所有的动态页面进行参数映射的表达式是：<br />
把 </em><a href="http://www.myhost.com/foo.php?a=A&#038;b=B&#038;c=C"><em>http://www.myhost.com/foo.php?a=A&#038;b=B&#038;c=C</em></a><em><br />
表现成 </em><a href="http://www.myhost.com/foo.php/a/A/b/B/c/C"><em>http://www.myhost.com/foo.php/a/A/b/B/c/C</em></a><em>。<br />
RewriteRule (.*?\.php)(\?[^/]*)?/([^/]*)/([^/]*)(.+?)? $1(?2$2&#038;:\?)$3=$4?5$5: [N,I]</em></p></blockquote>
<p>这段例子我在自家的<a href="http://httpd.apache.org" target="_blank">apache</a>上操练了很久,反复的调试,修改httpd.conf,查看error.log,rewrite.log,失败的一塌糊涂,几乎让我产生巨大的挫败感.后来查看了apache手册的rewrite指南,发觉里面根本没有[N,I]这个I flag,这下终于明白,这个rewrite规则8成是在IIS上面适用,IIS和apache向来是世仇,通用就甭考虑了.这里又去麻烦网管大哥,讨得下面这段rewrite规则,基本满足需求:</p>
<p>RewriteEngine on<br />
RewriteMap    quux-map       prg:/root/t.sh<br />
RewriteRule   ^/(.*)\.php/(.*)  /$1.php?${quux-map:$2}</p>
<p>cat t.sh</p>
<blockquote><p><em>#!/bin/sh</em></p>
<p><em>LOGFILE=/tmp/percent_rewrite.log<br />
cat /dev/null > $LOGFILE</em></p>
<p><em>while read URL<br />
do<br />
NEWURL=$(echo "$URL" |  sed -e 's/\([^/]*\)\/\([^/]*\)\//\1=\2\&#038;/g' | sed 's/[/&#038;]$//' | sed 's/\//=/' )<br />
echo "Changing $URL to $NEWURL" >> $LOGFILE<br />
echo $NEWURL</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/170/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>apache的rewrite &#8211; 代理吞吐(Proxy Throughput)功能</title>
		<link>http://www.ooso.net/archives/168</link>
		<comments>http://www.ooso.net/archives/168#comments</comments>
		<pubDate>Tue, 14 Mar 2006 13:13:15 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/168</guid>
		<description><![CDATA[今天尝试使用apache的rewrite作为ajax跨域调用代理,要用到rewrite的Proxy Throughput功能.翻看apache手册,看上去不算太复杂,只要用flag [P]就可以映射远程页面甚至整个远程网络区域到自己的名称空间.照着手册上写了个配置:
RewriteEngine On
RewriteRule ^/proxy/(.*)$ http://$1 [P,L]
我想通过上面的url重写达到这样的效果,使用代理功能访问http://www.mysite.com/proxy/www.destsite.com,自动使用代理访问www.destsite.com, url不改变.重启apache后,进行测试,始终是无法访问,于是开启rewrite日志:

				<span class="readmore"><a href="http://www.ooso.net/archives/168" title="apache的rewrite &#8211; 代理吞吐(Proxy Throughput)功能">阅读全文（597字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天尝试使用apache的rewrite作为ajax跨域调用代理,要用到rewrite的Proxy Throughput功能.翻看apache手册,看上去不算太复杂,只要用flag <code><font face="Courier New">[P]就可以</font></code>映射远程页面甚至整个远程网络区域到自己的名称空间.照着手册上写了个配置:</p>
<p>RewriteEngine On<br />
RewriteRule ^/proxy/(.*)$ <a href="http://$1/">http://$1</a> [P,L]</p>
<p>我想通过上面的url重写达到这样的效果,使用代理功能访问http://www.mysite.com/proxy/www.destsite.com,自动使用代理访问www.destsite.com, url不改变.重启apache后,进行测试,始终是无法访问,于是开启rewrite日志:</p>
<p>RewriteLogLevel 9<br />
RewriteLog logs/rewrite.log</p>
<p>日志中显示已经正确转向到<a href="http://www.destsite.com/">www.destsite.com</a>,但是仍然无法访问.郁闷的很,找这边的网管大哥讨教,被告知要开启proxy功能,否则rewrite的Proxy Throughput功能无法使用.于是修改httpd.conf,加入两行:</p>
<p>LoadModule proxy_module modules/mod_proxy.so<br />
LoadModule proxy_http_module modules/mod_proxy_http.so</p>
<p>重启apache测试,一切ok</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/168/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache的rotatelogs使用手记</title>
		<link>http://www.ooso.net/archives/134</link>
		<comments>http://www.ooso.net/archives/134#comments</comments>
		<pubDate>Tue, 29 Nov 2005 08:25:22 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/134</guid>
		<description><![CDATA[今天妄图使用apache的rotatelogs来回卷Apache日志，翻看手册，很简单
CustomLog "&#124;bin/rotatelogs /var/logs/logfile 86400" common 
我需要两个小时生成一个apache日志，并以时间命名，于是依样画葫芦修改httpd.conf
CustomLog "&#124;bin/rotatelogs /var/logs/%Y%m%d%H.logfile 7200" common 

				<span class="readmore"><a href="http://www.ooso.net/archives/134" title="apache的rotatelogs使用手记">阅读全文（815字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天妄图使用apache的rotatelogs来回卷Apache日志，翻看手册，很简单</p>
<blockquote><p>CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common </p></blockquote>
<p>我需要两个小时生成一个apache日志，并以时间命名，于是依样画葫芦修改httpd.conf</p>
<blockquote><p>CustomLog "|bin/rotatelogs /var/logs/%Y%m%d%H.logfile 7200" common </p></blockquote>
<p>重启apache失败，说明葫芦不能照着画:</p>
<blockquote><p>CustomLog "|/usr/local/httpd/bin/rotatelogs /var/logs/%Y%m%d%H.logfile 7200" common </p></blockquote>
<p>修改后apache成功启动,但是生成的日志文件名(以小时命名)有些问题，与服务器时间相差8小时，仔细查看手册，原来是rotatelogs的使用有些机关(有个offset参数，单位是分钟)</p>
<blockquote><p>CustomLog "|/usr/local/httpd/bin/rotatelogs /var/logs/%Y%m%d%H.logfile 7200 480" common </p></blockquote>
<p>重启后收工</p>
<p>附rotatelogs说明</p>
<blockquote><p>rotatelogs logfile [ rotationtime [ offset ]] | [ filesizeM ]</p>
<p>选项<br />
logfile<br />
它加上基准名就是日志文件名。如果logfile中包含'%'，则它会被视为用于的strftime(3)的格式字串；否则，它会被自动加上以秒为单位的.nnnnnnnnnn后缀。这两种格式都表示新的日志开始使用的时间。<br />
rotationtime<br />
日志文件回卷的以秒为单位的间隔时间<br />
offset<br />
相对于UTC的时差的分钟数。如果省略，则假定为0，并使用UTC时间。比如，要指定UTC时差为-5小时的地区的当地时间，则此参数应为-300。<br />
filesizeM<br />
指定回卷时以兆字节为单位的后缀字母M的文件大小，而不是指定回卷时间或时差。 </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/134/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fedora 4下面安装apache+php5无法启动</title>
		<link>http://www.ooso.net/archives/133</link>
		<comments>http://www.ooso.net/archives/133#comments</comments>
		<pubDate>Thu, 24 Nov 2005 03:56:54 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/133</guid>
		<description><![CDATA[今天在fedora 4下面安装按常规步骤安装apache+php5，无法启动。
输入apacheclt start后显示：
modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
google之，找到了原因：

				<span class="readmore"><a href="http://www.ooso.net/archives/133" title="fedora 4下面安装apache+php5无法启动">阅读全文（485字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天在fedora 4下面安装按<a href="http://www.ooso.net/article/html/install.htm">常规步骤</a>安装apache+php5，无法启动。</p>
<p>输入apacheclt start后显示：</p>
<blockquote><p>modules/libphp5.so: cannot restore segment prot after reloc: Permission denied</p></blockquote>
<p>google之，找到了原因：<br />
<a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=153146">https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=153146</a></p>
<blockquote><p>That error is from selinux which was apparently supposed to be fixed to complain<br />
like that (rh#147806#). Though the real problem is that libicudata is supposed<br />
to be compiled with -fpic, which was also supposed to be fixed. I see now that<br />
the upsteam patch is b0rked.
</p></blockquote>
<p>原来是selinux安装包惹的祸，升级后apache正常启动:<br />
<em><strong>yum update selinux-policy-targeted</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/133/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache的AddDefaultCharset</title>
		<link>http://www.ooso.net/archives/48</link>
		<comments>http://www.ooso.net/archives/48#comments</comments>
		<pubDate>Sat, 03 Aug 2002 08:33:48 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/?p=48</guid>
		<description><![CDATA[看了这篇文章:配置 Apache 强行指定浏览器编码选择 ,俺也有些感想:
apache 2的配置文件中,AddDefaultCharset缺省是ISO-8859-1,所以很多人刚开始用的时候会把它改成GB2312,这样就可以避免乱码问题.
我也推荐人家用这个解决办法在一段时间里,直到有一次看到一个UTF-8编码的页面,始终是乱码,无可救药的乱码,任你如何调整浏览器的设置.无奈之下我把AddDefaultCharset那行整个屏蔽了,突然发现所有UTF-8页面恢复了正常,真的好神奇耶!!
从此,我深深的认识到:在AddDefaultCharset被屏蔽的情况下,页面的编码是由&#60;meta&#62;标记决定的.
]]></description>
			<content:encoded><![CDATA[<p>看了这篇文章:<a href="http://weblog.mywww.biz/arnold/" target="_blank"><img src="/images/url.gif" border="0" alt="超链接地址" align="bottom">配置 Apache 强行指定浏览器编码选择</a> ,俺也有些感想:</p>
<p>apache 2的配置文件中,AddDefaultCharset缺省是ISO-8859-1,所以很多人刚开始用的时候会把它改成GB2312,这样就可以避免乱码问题.</p>
<p>我也推荐人家用这个解决办法在一段时间里,直到有一次看到一个UTF-8编码的页面,始终是乱码,无可救药的乱码,任你如何调整浏览器的设置.无奈之下我把AddDefaultCharset那行整个屏蔽了,突然发现所有UTF-8页面恢复了正常,真的好神奇耶!!</p>
<p>从此,我深深的认识到:<b>在AddDefaultCharset被屏蔽的情况下,页面的编码是由&lt;meta&gt;标记决定的.</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/48/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>为什么flush不生效?</title>
		<link>http://www.ooso.net/archives/39</link>
		<comments>http://www.ooso.net/archives/39#comments</comments>
		<pubDate>Sat, 03 Aug 2002 08:33:48 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/?p=39</guid>
		<description><![CDATA[老早就看了这篇文章:
类似socket传输的flush() 
非常简单的代码,却总是不能在我的服务器上正常运行,如下:
PLAIN TEXT

				<span class="readmore"><a href="http://www.ooso.net/archives/39" title="为什么flush不生效?">阅读全文（77字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>老早就看了这篇文章:<br />
<br /><a href="http://www.fanqiang.com/a4/b4/20011203/0710004.html" target="_blank"><img src="/images/url.gif" border="0" alt="超链接地址" align="bottom"/>类似socket传输的flush()</a> </p>
<p>非常简单的代码,却总是不能在我的服务器上正常运行,如下:</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showCodeTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$i</span> = <span style="color:#CC66CC;color:#800000;">1</span>; <span style="color:#0000FF;">$i</span> &lt;= <span style="color:#CC66CC;color:#800000;">500</span>; <span style="color:#0000FF;">$i</span>++<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#000066;">print</span> ” “;&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#000066;">ob_implicit_flush</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#616100;">for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$j</span> = <span style="color:#CC66CC;color:#800000;">1</span>; <span style="color:#0000FF;">$j</span> &lt;= <span style="color:#CC66CC;color:#800000;">30</span>; <span style="color:#0000FF;">$j</span>++<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#000066;">echo</span> <span style="color:#0000FF;">$j</span>.“&lt;br&gt;”;&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#000066;">sleep</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>百思不得其解,最后找到apache的httpd.conf配置文件,发觉压缩输出的选项deflate被打开,上面小程序一直要等待压缩完毕才会出现效果,实时输出的效果也就无法体现了.调整deflate压缩的范围,重启apache,一切正常收工.<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/39/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>利用xampp将apache和tomcat整合</title>
		<link>http://www.ooso.net/archives/73</link>
		<comments>http://www.ooso.net/archives/73#comments</comments>
		<pubDate>Sat, 03 Aug 2002 08:33:48 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">/?p=73</guid>
		<description><![CDATA[xampp可以将apache+php+mysql+phpmyadmin一次性自动安装完成,很适合快速搭建测试服务器.它也提供了tomcat的插件,可以很快的搭建jsp开发环境.
以俺在winxp安装为例:1.在http://www.apachefriends.org/en/xampp-windows.html下载XAMPP,推荐下载EXE (7-zip) 打包的xampp,这个个头比较小,部署的时候也比较灵活.2.在同一页面下载tomcat插件,同样选择7-zip包3.解压xampp的压缩包到你指定的目录,例如d:xampp4.运行setup_xampp.bat,至此,xampp安装完成5.解压tomcat插件到xampp目录,运行setup_java.bat即可将tomcat插件安装完毕

				<span class="readmore"><a href="http://www.ooso.net/archives/73" title="利用xampp将apache和tomcat整合">阅读全文（830字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.apachefriends.org/en/xampp.html">xampp</a>可以将apache+php+mysql+phpmyadmin一次性自动安装完成,很适合快速搭建测试服务器.它也提供了tomcat的插件,可以很快的搭建jsp开发环境.</p>
<p>以俺在winxp安装为例:<br />1.在<a href="http://www.apachefriends.org/en/xampp-windows.html">http://www.apachefriends.org/en/xampp-windows.html</a>下载XAMPP,推荐下载<strong>EXE (7-zip)</strong> 打包的xampp,这个个头比较小,部署的时候也比较灵活.<br />2.在同一页面下载tomcat插件,同样选择<strong>7-zip</strong>包<br />3.解压xampp的压缩包到你指定的目录,例如d:xampp<br />4.运行setup_xampp.bat,至此,xampp安装完成<br />5.解压tomcat插件到xampp目录,运行setup_java.bat即可将tomcat插件安装完毕</p>
<p>现在一个php+jsp的快速开发环境已经搭建好了.</p>
<p> 附上tomcat的配置(详细信息见<a href="http://www.apachefriends.org/en/winxampp/readme-addon-tomcat.txt">Readme</a>):<br />Tomcat Server Home = .xampptomcat<br />Tomcat URL = http://localhost:8080<br />Tomcat Doc Root = .xampptomcatwebapps</p>
<p>JSP example Root = .xampptomcatwebappsjsp-examples<br />JSP example URL = http://localhost/jsp-examples/</p>
<p>Servlets example Root = .xampptomcatwebappsservlets-examples<br />Servlets example URL = http://localhost/servlets-examples/</p>
<p>Mod_jk java Root = .xampptomcatweppappsjava<br />Mod_jk java URL = http://localhost/java/ </p>
<p>倘若你想建立更多的映射,那么就需要自行修改.xamppapacheconfworkers2.properties文件</p>
<p>[@more@]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/73/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache2的中文手册</title>
		<link>http://www.ooso.net/archives/37</link>
		<comments>http://www.ooso.net/archives/37#comments</comments>
		<pubDate>Sat, 03 Aug 2002 08:33:48 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/?p=37</guid>
		<description><![CDATA[找到了apache2的中文手册下载:
下载地址
]]></description>
			<content:encoded><![CDATA[<p>找到了apache2的中文手册下载:<br />
<br /><a href="http://kajaa.bbs.us/docs/LocalDocs/amiproject.html" target="_blank"><img src="/images/url.gif" border="0" alt="超链接地址" align="bottom">下载地址</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/37/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在apache上给一个虚拟主机同时绑定两个端口</title>
		<link>http://www.ooso.net/archives/107</link>
		<comments>http://www.ooso.net/archives/107#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/?p=107</guid>
		<description><![CDATA[今天给同一虚拟主机添加了两个端口,过程如下:[@more@]
今天给同一虚拟主机添加了两个端口,过程如下:
绑定端口为:80,8080
1.在httpd.conf中添加:

				<span class="readmore"><a href="http://www.ooso.net/archives/107" title="在apache上给一个虚拟主机同时绑定两个端口">阅读全文（278字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天给同一虚拟主机添加了两个端口,过程如下:[@more@]
<p>今天给同一虚拟主机添加了两个端口,过程如下:</p>
<p>绑定端口为:80,8080</p>
<p>1.在httpd.conf中添加:</p>
<p>Listen 8080</p>
<p>2.复制原虚拟主机配置</p>
<p> </p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px dotted; BORDER-LEFT: #cccccc 1px dotted; BORDER-BOTTOM: #cccccc 1px dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#fdfddf"><font style="FONT-WEIGHT: bold; COLOR: #990000">以下是代码片段：</font>
<p>&lt;VirtualHost *:80&gt;</p>
<p>.....</p>
<p>&lt;/VirtualHost&gt;</p>
</td>
</tr>
</tbody>
</table>
<p>添加:</p>
<p> </p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px dotted; BORDER-LEFT: #cccccc 1px dotted; BORDER-BOTTOM: #cccccc 1px dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#fdfddf"><font style="FONT-WEIGHT: bold; COLOR: #990000">以下是代码片段：</font>
<p>&lt;VirtualHost *:8080&gt;</p>
<p>.....</p>
<p>&lt;/VirtualHost&gt;</p>
</td>
</tr>
</tbody>
</table>
<p>但是实际上有更简化的写法:</p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px dotted; BORDER-LEFT: #cccccc 1px dotted; BORDER-BOTTOM: #cccccc 1px dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#fdfddf"><font style="FONT-WEIGHT: bold; COLOR: #990000">以下是代码片段：</font>
<p>&lt;VirtualHost *:80 *:8080&gt;</p>
<p>.....</p>
<p>&lt;/VirtualHost&gt;</p>
</td>
</tr>
</tbody>
</table>
<p> </p>
<p>重启apache观察配置是否生效</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/107/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>定制apache目录列表的描述</title>
		<link>http://www.ooso.net/archives/106</link>
		<comments>http://www.ooso.net/archives/106#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[common]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">/?p=106</guid>
		<description><![CDATA[Apache中目录的Option设置为Indexes后，文件和文件夹将列表出来，其中有一项是‘描述’Description的，这个属性可以对文件进行一些描述，但是如何赋值呢？

查看apache的手册,我们可以找到这个属性:
AddDescription Directive

				<span class="readmore"><a href="http://www.ooso.net/archives/106" title="定制apache目录列表的描述">阅读全文（559字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><font size="2"><font color="#cc0033">Apache</font>中目录的Option设置为<font color="#cc0033">Indexes</font>后，文件和文件夹将列表出来，其中有一项是‘描述’<br /><font color="#cc0033">Description</font>的，这个属性可以对文件进行一些描述，但是如何赋值呢？</font></p>
<p><span id="more-106"></span></p>
<p>查看apache的手册,我们可以找到这个属性:</p>
<h3>AddDescription Directive</h3>
<p>例如<code>AddDescription &quot;The planet Mars&quot; /web/pics/mars.gif </code></p>
<p>这样就可以给每个文件定义描述文字.</p>
<p> 但是有没有办法让apache自动读取html的title标记,自动生成描述文字呢?继续查找手册,也有答案:</p>
<blockquote><p>ScanHTMLTitles </p>
<p>This enables the extraction of the title from HTML documents for fancy indexing. If the file does not have a description given by<br />
AddDescription<br />
 then httpd will read the document for the value of the<br />
title<br />
 element. This is CPU and disk intensive. </p></blockquote>
<p> 使用ScanHTMLTitles就可以让apache自动读取html文档的title标记了,例:<br /><code>IndexOptions FancyIndexing ScanHTMLTitles</code></p>
</dd>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/106/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
