Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_index_module.xml @ 271:4c6d2c614d2c
Cleaned up XML tag mess:
- all of <parameter> and <code>, and some of <dirname>, <value>,
and <command> were replaced by <literal>;
- the rest of <dirname> were replaced by links;
- <argument> were replaced by <value>;
- <value> is now rendered in HTML in italic;
- <literal> and <path> can now contain <value>.
Cleaned up terminology mess:
- directives take "parameters".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 23 Dec 2011 17:29:59 +0000 |
parents | bfe3eff81d04 |
children | 197ac51e7f0e |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
153
diff
changeset
|
1 <?xml version="1.0"?> |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 <module name="Module ngx_http_index_module" |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 link="/en/docs/http/ngx_http_index_module.html" |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 lang="en"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <section id="summary"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 <para> |
271 | 12 The module <literal>ngx_http_index_module</literal> processes requests |
13 ending with the slash character (‘<literal>/</literal>’). | |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 </section> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 <section name="Example Configuration" id="example"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 <para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 <example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 location / { |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 index index.$geo.html index.html; |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 } |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 </example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 </section> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 <section name="Directives" id="directives"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <directive name="index"> |
271 | 35 <syntax><value>file</value> ...</syntax> |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <default>index.html</default> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 <context>http</context> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 <context>server</context> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 <context>location</context> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 <para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 Defines files that will be used as an index. |
271 | 43 The <value>file</value> name can contain variables. |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 Files are checked in the specified order. |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 The last element of the list can be a file with an absolute path. |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 Example: |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 index index.$geo.html index.0.html /index.html; |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 </example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 It should be noted that when using an index file, an internal redirect |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 is made, and request can be processed in a different location. |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 For example, with the following configuration: |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 location = / { |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 index index.html; |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 } |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 location / { |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 ... |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 } |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 </example> |
271 | 65 a request of “<literal>/</literal>” will actually be processed in the |
66 second location as “<literal>/index.html</literal>”. | |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 </directive> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 </section> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 </module> |