模块ngx_http_autoindex_module

Example Configuration
Directives
autoindex
autoindex_exact_size
autoindex_format
autoindex_localtime

ngx_http_autoindex_module模块处理以斜线字符('/')结尾的请求并生成目录列表。ngx_http_index_module模块找不到索引文件时,通常会将请求传递给ngx_http_autoindex_module模块。

Example Configuration

location / {
    autoindex on;
}

Directives

句法: autoindex on | 关 T3>; T0>
默认:
autoindex off;
语境: http服务器位置

启用或禁用目录列表输出。

句法: autoindex_exact_size on | 关 T3>; T0>
默认:
autoindex_exact_size on;
语境: http服务器位置

对于HTML 格式,指定是否应在目录列表中输出确切的文件大小,或者舍入到千字节,兆字节和千兆字节。

句法: autoindex_format html | xml | json | JSONP T5>; T0>
默认:
autoindex_format html;
语境: http服务器位置

该指令出现在1.7.9版本中。

设置目录列表的格式。

当使用JSONP格式时,使用回调请求参数设置回调函数的名称。如果参数丢失或空值,则使用JSON格式。

可以使用ngx_http_xslt_module模块转换XML输出。

句法: autoindex_localtime on | 关 T3>; T0>
默认:
autoindex_localtime off;
语境: http服务器位置

对于HTML 格式,指定目录列表中的时间是否应在本地时区或UTC输出。