HttpAutoindex模块

此模块用于自动生成目录列表.

ngx_http_autoindex_module只在 ngx_http_index_module模块未找到索引文件时发出请求.

配置实例

  1. location / {
  2. : autoindex on;
  3. }

指导

  • [#autoindex autoindex]
  • [#autoindex_exact_size autoindex_exact_size]
  • [#autoindex_localtime autoindex_localtime]

autoindex

syntax:autoindex [ on|off ]

default:autoindex off

context:http, server, location

激活/关闭自动索引

autoindex_exact_size

syntax:autoindex_exact_size [ on|off ]

default:autoindex_exact_size on

context:http, server, location

设定索引时文件大小的单位(B,KB, MB 或 GB)

autoindex_localtime

syntax:autoindex_localtime [ on|off ]

default:autoindex_localtime off

context:http, server, location

开启以本地时间来显示文件时间的功能。默认为关(GMT时间)

参考

Original Documentation