Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_index_module.xml @ 667:81ac18894319
link and lang tags corrected.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Wed, 05 Sep 2012 16:00:37 +0000 |
parents | 764fbac1b8b4 |
children | 0422511d9bee |
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 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
7 |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <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
|
11 link="/en/docs/http/ngx_http_index_module.html" |
589 | 12 lang="en" |
13 rev="1"> | |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
271 | 18 The module <literal>ngx_http_index_module</literal> processes requests |
19 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
|
20 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 </section> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
320 | 25 <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
|
26 |
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 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
29 location / { |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
30 index index.$geo.html index.html; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
31 } |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 </example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 </section> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 |
320 | 38 <section id="directives" name="Directives"> |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <directive name="index"> |
271 | 41 <syntax><value>file</value> ...</syntax> |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 <default>index.html</default> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 <context>http</context> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 <context>server</context> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <context>location</context> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 Defines files that will be used as an index. |
271 | 49 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
|
50 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
|
51 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
|
52 Example: |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
54 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
|
55 </example> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 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
|
60 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
|
61 For example, with the following configuration: |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
63 location = / { |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
64 index index.html; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
65 } |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
67 location / { |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
68 ... |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
320
diff
changeset
|
69 } |
153
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 </example> |
271 | 71 a request of “<literal>/</literal>” will actually be processed in the |
72 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
|
73 </para> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </directive> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 </section> |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 |
317ac898ba50
Initial translation of the "ngx_http_index_module" and
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 </module> |