nginx开启目录浏览下载功能(autoindex)
2017-01-11 15:44
519 查看
HTTP目录清单生成模块(HTTP Auto Index)
·摘要
这个模块提供自动目录列表。
连接请求仅在ngx_http_index_module中没有找到主页文件时才会请求这个模块。
location / {
autoindex on; #开启目录浏览下载功能
}
二级目录时也可以使用此功能localtion /download/{
autoindex on; #开启目录浏览下载功能
autoindex_exact_size off;#指定文件大小显示为M默认是b
autoindex_localtime on; #开启以服务器本地时区显示文件修改日期 默认为 off,以 GMT 时间作为显示的文件时间;
alias /home/test/;
}
配置完成后,保存,重启nginx通过浏览器访问该路径时,会有如下效果。
指令:
autoindex
语法:autoindex [ on|off ]
默认值:autoindex off
使用字段:http, server, location
是否使用自动目录列表。
autoindex_exact_size
语法:autoindex_exact_size [ on|off ]
默认值:autoindex_exact_size on
使用字段:http, server, location
指定生成的自动目录文件大小,可以是精确到bytes或者使用KB, MB或GB。
autoindex_localtime
语法:autoindex_localtime [ on|off ]
默认值:autoindex_localtime off
使用字段:http, server, location
是否在目录列表文件中显示本地时间(GMT时间),默认为关。
相关文章推荐
- Nginx打开目录浏览功能(autoindex)
- CentOS 6.3安装Nginx开启目录浏览、下载功能
- Nginx打开目录浏览功能(autoindex)
- Nginx打开目录浏览功能(autoindex)
- Nginx打开目录浏览功能(autoindex)
- Nginx打开目录浏览功能(autoindex)以及常见问题解决方案
- Nginx打开目录浏览功能(autoindex)
- Nginx开启目录浏览、下载、流控、访问限制功能
- Nginx打开目录浏览功能(autoindex)
- Nginx打开目录浏览功能(autoindex)
- Nginx目录浏览功能(autoindex)
- CentOS 6.3安装Nginx开启目录浏览、下载功能
- Nginx怎么打开目录浏览功能(autoindex)
- Nginx打开目录浏览功能(autoindex)
- Nginx打开目录浏览功能(autoindex)
- ubuntu 安装nginx 并开启目录浏览功能
- nginx,apache开启文件目录浏览功能
- linux下nginx开启目录浏览功能
- Nginx 开启目录浏览功能配置
- nginx 开启目录浏览功能