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