VPS侦探论坛

标题: Nginx支持第三方目录浏览功能,更美观 [打印本页]

作者: hackin    时间: 2010-7-10 16:42
标题: Nginx支持第三方目录浏览功能,更美观
官方文档地址: http://wiki.nginx.org/NginxHttpAutoindexModule

[root@slave ~]# wget http://download.snake.de/dist/ngx-fancyindex-0.2.1.tar.bz2
[root@slave ~]# tar jxvf ngx-fancyindex-0.2.1.tar.bz2
[root@slave nginx-0.7.65]#  ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/root/ngx-fancyindex-0.2.1
[root@slave nginx-0.7.65]# make && make install
然后根据自己的目录浏览要求配置 nginx.conf ,以下为我的主机配置
server  {
                   listen 80;
                   server_name 192.168.11.12;
                  location / {
                    fancyindex on;#开启 fancy indexes
                    fancyindex_exact_size off;#显示文件大小。
                    # autoindex on;
                    #autoindex_localtime on;
                    #autoindex_exact_size off; 注释这三项是不装插件开启目录浏览功能。
                     root /data ;
                            }
                             }
作者: 54wz    时间: 2010-7-10 21:44
这个有啥用呢?




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4