模块 ngx_http_autoindex_module
示例配置 Directives autoindex autoindex_exact_size autoindex_format autoindex_localtime |
这ngx_http_autoindex_module模块处理请求
以斜杠字符 ('') 结尾,并生成
目录列表。
通常,请求会传递给/ngx_http_autoindex_modulemodule 时,ngx_http_index_module module
找不到索引文件。
示例配置
location / {
autoindex on;
}
Directives
| 语法: |
autoindex |
|---|---|
| 默认值: |
autoindex off; |
| 上下文: |
http,server,location |
启用或禁用目录列表输出。
| 语法: |
autoindex_exact_size |
|---|---|
| 默认值: |
autoindex_exact_size on; |
| 上下文: |
http,server,location |
对于 HTML 格式, 指定是否应在目录列表中输出确切的文件大小, 或者更确切地说,四舍五入为千字节、兆字节和千兆字节。
| 语法: |
autoindex_format
|
|---|---|
| 默认值: |
autoindex_format html; |
| 上下文: |
http,server,location |
该Directives出现在版本 1.7.9 中。
设置目录列表的格式。
使用 JSONP 格式时,会设置回调函数的名称
使用callbackrequest 参数。
如果参数缺失或值为空,则
然后使用 JSON 格式。
可以使用 ngx_http_xslt_module 模块转换 XML 输出。
| 语法: |
autoindex_localtime |
|---|---|
| 默认值: |
autoindex_localtime off; |
| 上下文: |
http,server,location |
对于 HTML 格式, 指定目录列表中的时间是否应为 输出(以本地时区或 UTC 格式显示)。