Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_map_module.xml @ 348:5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
ngx_http_realip_module, ngx_http_secure_link_module,
ngx_http_split_clients_module, and ngx_http_sub_module.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 Jan 2012 16:50:35 +0000 |
parents | |
children | aef88cb1d75c |
comparison
equal
deleted
inserted
replaced
347:daae2b619815 | 348:5a848934a12d |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Module ngx_http_map_module" | |
6 link="/en/docs/http/ngx_http_map_module.html" | |
7 lang="en"> | |
8 | |
9 <section id="summary"> | |
10 | |
11 <para> | |
12 The <literal>ngx_http_map_module</literal> module creates variables | |
13 whose values depend on values of other variables. | |
14 </para> | |
15 | |
16 </section> | |
17 | |
18 | |
19 <section id="example" name="Example Configuration"> | |
20 | |
21 <para> | |
22 <example> | |
23 map $http_host $name { | |
24 hostnames; | |
25 | |
26 default 0; | |
27 | |
28 example.com 1; | |
29 *.example.com 1; | |
30 test.com 2; | |
31 *.test.com 2; | |
32 .site.com 3; | |
33 wap.* 4; | |
34 } | |
35 </example> | |
36 </para> | |
37 | |
38 </section> | |
39 | |
40 | |
41 <section id="directives" name="Directives"> | |
42 | |
43 <directive name="map"> | |
44 <syntax block="yes"> | |
45 <value>$variable1</value> | |
46 <value>$variable2</value></syntax> | |
47 <default/> | |
48 <context>http</context> | |
49 | |
50 <para> | |
51 Creates a variable whose value | |
52 depends on the value of another variable. | |
53 The directive supports three special parameters: | |
54 <list type="tag"> | |
55 <tag-name><literal>default</literal> <value>value</value></tag-name> | |
56 <tag-desc> | |
57 sets a value for the second variable when the value | |
58 of the first variable cannot be found. | |
59 </tag-desc> | |
60 | |
61 <tag-name><literal>hostnames</literal></tag-name> | |
62 <tag-desc> | |
63 allows to specify hostnames with a prefix or suffix mask, as source | |
64 values, for example, | |
65 <example> | |
66 *.example.com 1; | |
67 example.* 1; | |
68 </example> | |
69 The following two records | |
70 <example> | |
71 example.com 1; | |
72 *.example.com 1; | |
73 </example> | |
74 can be combined: | |
75 <example> | |
76 .example.com 1; | |
77 </example> | |
78 </tag-desc> | |
79 | |
80 <tag-name><literal>include</literal> <value>file</value></tag-name> | |
81 <tag-desc> | |
82 includes a file with values. | |
83 There can be several inclusions. | |
84 </tag-desc> | |
85 | |
86 </list> | |
87 </para> | |
88 | |
89 </directive> | |
90 | |
91 | |
92 <directive name="map_hash_bucket_size"> | |
93 <syntax><value>size</value></syntax> | |
94 <default>32|64|128</default> | |
95 <context>http</context> | |
96 | |
97 <para> | |
98 Sets the bucket size for the <link id="map"/> variables hash tables. | |
99 Default value depends on the size of the processor's cache line. | |
100 For more information, please refer to | |
101 <link doc="../hash.xml">Setting Up Hashes</link>. | |
102 </para> | |
103 | |
104 </directive> | |
105 | |
106 | |
107 <directive name="map_hash_max_size"> | |
108 <syntax><value>size</value></syntax> | |
109 <default>2048</default> | |
110 <context>http</context> | |
111 | |
112 <para> | |
113 Sets the maximum <value>size</value> of the <link id="map"/> variables | |
114 hash tables. | |
115 For more information, please refer to | |
116 <link doc="../hash.xml">Setting Up Hashes</link>. | |
117 </para> | |
118 | |
119 </directive> | |
120 | |
121 </section> | |
122 | |
123 </module> |