Nginx笔记总结十九:nginx + fancy实现漂亮的索引目录

编译:./configure --prefix=/usr/local/nginx --add-module=../ngx-fancyindex-master

配置:

location / {

fancyindex on; 开启fancy索引

fancyindex_exact_size off; 不使用精确大小,使用四舍五入

fancyindex_localtime on; 使用本地时间

fancyindex_footer "myfooter.shtml"; 当前路径下的myfooter.shtml内容作为底部

}

fancyindex_css_href uri* 设置外部css路径,会替代原有的css样式

fancyindex_hreader 插入到索引页面头部,和fancyindex_footer类似

fancyindex_ignore 隐藏哪些目录或文件,支持正则表达式

fancyindex_ignore "dir*" "filea.txt"