<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[nginx目录浏览第三方插件fancyindex]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[服务器类]]></category>
<pubDate>Sun, 15 May 2011 19:22:30 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	nginx添加参数可以允许打开目录浏览功能，详见http://bbs.linuxtone.org/viewthread.php?tid=2563&rpid=9073&ordertype=0&page=1#pid9073或者<br/>官方的 http://wiki.nginx.org/NginxHttpAutoindexModule<br/> <br/>这是说的是支持目录浏览的第三方插件fancyindex<br/>本次试验用的nginx-0.8.15<br/>第三方插件下载地址<br/>http://download.snake.de/dist/ngx-fancyindex-0.2.1.tar.bz2 <br/><br/>[root@test src]# tar zxvf nginx-0.8.15.tar.gz<br/>[root@test src]# tar jxvf ngx-fancyindex-0.2.1.tar.bz2<br/>[root@test src]# cd nginx-0.8.15<br/>[root@test nginx-0.8.15]# ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=../ngx-fancyindex-0.2.1<br/><br/>然后根据自己的目录浏览要求配置 nginx.conf ，以下为我的主机配置<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">server &#123;<br/> listen 80;<br/> server_name 192.168.11.12;<br/> location / &#123;<br/> fancyindex on;#开启 fancy indexes<br/> fancyindex_exact_size off;#显示文件大小。<br/> # autoindex on;<br/> #autoindex_localtime on;<br/> #autoindex_exact_size off; 注释这三项是不装插件开启目录浏览功能。<br/> root /data ;<br/> &#125;<br/> &#125;</div></div><br/>[root@test nginx]# ./sbin/nginx -t <br/>the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok<br/>configuration file /usr/local/nginx/conf/nginx.conf test is successful<br/>[root@test nginx]# ./sbin/nginx<br/><br/>完成配置。<br/>这里只是用到了插件fancyindex的2个参数，还有 <a href="http://softwarelibre.udc.es/Projects/NginxFancyIndex#id9" target="_blank">fancyindex_localtime</a> ，<a href="http://softwarelibre.udc.es/Projects/NginxFancyIndex#id11" target="_blank">fancyindex_header</a>， <a href="http://softwarelibre.udc.es/Projects/NginxFancyIndex#id12" target="_blank">fancyindex_footer</a> = 大家研究一下。。可以看一下这里 http://wiki.nginx.org/NginxNgxFancyIndex 。<br/>不知道 安装这个插件与没有安装过插件开启，在效率上是否有不同。。。<br/>下面截图是 安装过插件 和nginx 开启目录浏览 截图。<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=16" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=16" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><a href="http://www.zhanghaijun.com/attachment.php?fid=17" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=17" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><a href="http://www.zhanghaijun.com/attachment.php?fid=18" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=18" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>Tags - <a href="http://www.zhanghaijun.com/tags/nginx/" rel="tag">nginx</a> , <a href="http://www.zhanghaijun.com/tags/fancyindex/" rel="tag">fancyindex</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] nginx目录浏览第三方插件fancyindex]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>