VPS侦探论坛

 找回密码
 注册
查看: 7854|回复: 1

[Apache] Nginx支持第三方目录浏览功能,更美观

[复制链接]
发表于 2010-7-10 16:42:10 | 显示全部楼层 |阅读模式

官方文档地址: 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 ;
                            }
                             }

评分

参与人数 1威望 +6 收起 理由
licess + 6

查看全部评分

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-7-10 21:44:20 | 显示全部楼层


这个有啥用呢?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-4-29 01:27 , Processed in 0.025780 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表