Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_index_module.xml @ 519:e23d718ac865
A link to CHANGES for 1.3 corrected.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Mon, 21 May 2012 15:15:17 +0000 |
parents | a4fa80755eab |
children | be54c443235a |
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 |
320 | 19 <section id="example" name="Example Configuration"> |
153
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> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
23 location / { |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
24 index index.$geo.html index.html; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
25 } |
153
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 |
320 | 32 <section id="directives" name="Directives"> |
153
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> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
48 index index.$geo.html index.0.html /index.html; |
153
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> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
57 location = / { |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
58 index index.html; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
59 } |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
61 location / { |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
62 ... |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
63 } |
153
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> |