Path: blob/main/xml/en/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="Module ngx_http_autoindex_module"10link="/en/docs/http/ngx_http_autoindex_module.html"11lang="en"12rev="4">1314<section id="summary">1516<para>17The <literal>ngx_http_autoindex_module</literal> module processes requests18ending with the slash character (‘<literal>/</literal>’) and produces19a directory listing.20Usually a request is passed to the <literal>ngx_http_autoindex_module</literal>21module when the22<link doc="ngx_http_index_module.xml">ngx_http_index_module</link> module23cannot find an index file.24</para>2526</section>272829<section id="example" name="Example Configuration">3031<para>32<example>33location / {34autoindex on;35}36</example>37</para>3839</section>404142<section id="directives" name="Directives">4344<directive name="autoindex">45<syntax><literal>on</literal> | <literal>off</literal></syntax>46<default>off</default>47<context>http</context>48<context>server</context>49<context>location</context>5051<para>52Enables or disables the directory listing output.53</para>5455</directive>565758<directive name="autoindex_exact_size">59<syntax><literal>on</literal> | <literal>off</literal></syntax>60<default>on</default>61<context>http</context>62<context>server</context>63<context>location</context>6465<para>66For the HTML <link id="autoindex_format">format</link>,67specifies whether exact file sizes should be output in the directory listing,68or rather rounded to kilobytes, megabytes, and gigabytes.69</para>7071</directive>727374<directive name="autoindex_format">75<syntax>76<literal>html</literal> |77<literal>xml</literal> |78<literal>json</literal> |79<literal>jsonp</literal></syntax>80<default>html</default>81<context>http</context>82<context>server</context>83<context>location</context>84<appeared-in>1.7.9</appeared-in>8586<para>87Sets the format of a directory listing.88</para>8990<para>91When the JSONP format is used, the name of a callback function is set92with the <literal>callback</literal> request argument.93If the argument is missing or has an empty value,94then the JSON format is used.95</para>9697<para>98The XML output can be transformed using the99<link doc="ngx_http_xslt_module.xml">ngx_http_xslt_module</link> module.100</para>101102</directive>103104105<directive name="autoindex_localtime">106<syntax><literal>on</literal> | <literal>off</literal></syntax>107<default>off</default>108<context>http</context>109<context>server</context>110<context>location</context>111112<para>113For the HTML <link id="autoindex_format">format</link>,114specifies whether times in the directory listing should be115output in the local time zone or UTC.116</para>117118</directive>119120</section>121122</module>123124125