Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/http/ngx_http_autoindex_module.xml
1 views
1
<?xml version="1.0"?>
2
3
<!--
4
Copyright (C) Igor Sysoev
5
Copyright (C) Nginx, Inc.
6
-->
7
8
<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9
10
<module name="Module ngx_http_autoindex_module"
11
link="/en/docs/http/ngx_http_autoindex_module.html"
12
lang="en"
13
rev="4">
14
15
<section id="summary">
16
17
<para>
18
The <literal>ngx_http_autoindex_module</literal> module processes requests
19
ending with the slash character (‘<literal>/</literal>’) and produces
20
a directory listing.
21
Usually a request is passed to the <literal>ngx_http_autoindex_module</literal>
22
module when the
23
<link doc="ngx_http_index_module.xml">ngx_http_index_module</link> module
24
cannot find an index file.
25
</para>
26
27
</section>
28
29
30
<section id="example" name="Example Configuration">
31
32
<para>
33
<example>
34
location / {
35
autoindex on;
36
}
37
</example>
38
</para>
39
40
</section>
41
42
43
<section id="directives" name="Directives">
44
45
<directive name="autoindex">
46
<syntax><literal>on</literal> | <literal>off</literal></syntax>
47
<default>off</default>
48
<context>http</context>
49
<context>server</context>
50
<context>location</context>
51
52
<para>
53
Enables or disables the directory listing output.
54
</para>
55
56
</directive>
57
58
59
<directive name="autoindex_exact_size">
60
<syntax><literal>on</literal> | <literal>off</literal></syntax>
61
<default>on</default>
62
<context>http</context>
63
<context>server</context>
64
<context>location</context>
65
66
<para>
67
For the HTML <link id="autoindex_format">format</link>,
68
specifies whether exact file sizes should be output in the directory listing,
69
or rather rounded to kilobytes, megabytes, and gigabytes.
70
</para>
71
72
</directive>
73
74
75
<directive name="autoindex_format">
76
<syntax>
77
<literal>html</literal> |
78
<literal>xml</literal> |
79
<literal>json</literal> |
80
<literal>jsonp</literal></syntax>
81
<default>html</default>
82
<context>http</context>
83
<context>server</context>
84
<context>location</context>
85
<appeared-in>1.7.9</appeared-in>
86
87
<para>
88
Sets the format of a directory listing.
89
</para>
90
91
<para>
92
When the JSONP format is used, the name of a callback function is set
93
with the <literal>callback</literal> request argument.
94
If the argument is missing or has an empty value,
95
then the JSON format is used.
96
</para>
97
98
<para>
99
The XML output can be transformed using the
100
<link doc="ngx_http_xslt_module.xml">ngx_http_xslt_module</link> module.
101
</para>
102
103
</directive>
104
105
106
<directive name="autoindex_localtime">
107
<syntax><literal>on</literal> | <literal>off</literal></syntax>
108
<default>off</default>
109
<context>http</context>
110
<context>server</context>
111
<context>location</context>
112
113
<para>
114
For the HTML <link id="autoindex_format">format</link>,
115
specifies whether times in the directory listing should be
116
output in the local time zone or UTC.
117
</para>
118
119
</directive>
120
121
</section>
122
123
</module>
124
125