Path: blob/main/xml/cn/docs/http/ngx_http_autoindex_module.xml
1 views
<?xml version="1.0"?>12<!--3Copyright (C) Igor Sysoev4Copyright (C) Nginx, Inc.5-->67<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">89<module name="ngx_http_autoindex_module模块"10link="/cn/docs/http/ngx_http_autoindex_module.html"11lang="cn"12translator="Weibin Yao"13rev="1">1415<section id="summary">1617<para>18<literal>ngx_http_autoindex_module</literal> 模块可以列出目录中的文件。19一般当<link doc="ngx_http_index_module.xml">ngx_http_index_module</link>模块找不到默认主页的时候,会把请求转给 <literal>ngx_http_autoindex_module</literal>模块去处理。20</para>2122</section>232425<section id="example" name="配置示例">2627<para>28<example>29location / {30autoindex on;31}32</example>33</para>3435</section>363738<section id="directives" name="指令">3940<directive name="autoindex">41<syntax><literal>on</literal> | <literal>off</literal></syntax>42<default>off</default>43<context>http</context>44<context>server</context>45<context>location</context>4647<para>48开启或者关闭列出目录中文件的功能。49</para>5051</directive>525354<directive name="autoindex_exact_size">55<syntax><literal>on</literal> | <literal>off</literal></syntax>56<default>on</default>57<context>http</context>58<context>server</context>59<context>location</context>6061<para>62设置目录中列出的文件是显示精确大小,还是对KB,MB,GB进行四舍五入。63</para>6465</directive>666768<directive name="autoindex_localtime">69<syntax><literal>on</literal> | <literal>off</literal></syntax>70<default>off</default>71<context>http</context>72<context>server</context>73<context>location</context>7475<para>76设置目录中列出文件的时间是本地时间还是UTC时间。77</para>7879</directive>8081</section>8283</module>848586