annotate xml/en/docs/http/ngx_http_map_module.xml @ 580:be54c443235a

Added copyright markers to documentation sources.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 10 Jul 2012 12:59:42 +0000
parents 17ceffcc7ffb
children 764fbac1b8b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 572
diff changeset
3 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 572
diff changeset
4 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 572
diff changeset
5 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 572
diff changeset
6 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 572
diff changeset
7
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 <module name="Module ngx_http_map_module"
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 link="/en/docs/http/ngx_http_map_module.html"
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
12 lang="en">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 <section id="summary">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 The <literal>ngx_http_map_module</literal> module creates variables
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 whose values depend on values of other variables.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 <section id="example" name="Example Configuration">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <example>
385
aef88cb1d75c Removed extraneous whitespace.
Ruslan Ermilov <ru@nginx.com>
parents: 348
diff changeset
28 map $http_host $name {
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 hostnames;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 default 0;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 *.example.com 1;
490
9913f1d51c07 Replaced "nginx" domain names with example domains.
Ruslan Ermilov <ru@nginx.com>
parents: 385
diff changeset
35 example.org 2;
9913f1d51c07 Replaced "nginx" domain names with example domains.
Ruslan Ermilov <ru@nginx.com>
parents: 385
diff changeset
36 *.example.org 2;
9913f1d51c07 Replaced "nginx" domain names with example domains.
Ruslan Ermilov <ru@nginx.com>
parents: 385
diff changeset
37 .example.net 3;
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 wap.* 4;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 }
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
40
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
41 map $http_user_agent $mobile {
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
42 default 0;
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
43 "~Opera Mini" 1;
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
44 }
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51 <section id="directives" name="Directives">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 <directive name="map">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54 <syntax block="yes">
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
55 <value>string</value>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
56 <value>$variable</value></syntax>
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 <default/>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
61 Creates a new variable whose value
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
62 depends on values of one or more of the source variables
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
63 specified in the first parameter.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
64 <note>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
65 Before version 0.9.0 only a single variable could be
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
66 specified in the first parameter.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
67 </note>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
68 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
69
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
70 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
71 Parameters inside the <literal>map</literal> block specify a mapping
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
72 between source and resulting values.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
73 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
74
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
75 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
76 Source values are specified as strings or regular expressions (0.9.6).
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
77 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
78
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
79 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
80 A regular expression should either start from the “<literal>~</literal>”
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
81 symbol for a case-sensitive matching, or from the “<literal>~*</literal>”
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
82 symbols (1.0.4) for case-insensitive matching.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
83 A regular expression can contain named and positional captures
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
84 that can later be used in other directives along with the
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
85 resulting variable.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
86 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
87
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
88 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
89 If a source value matches one of the names of special parameters
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
90 (see below), it should be prefixed with the “<literal>\</literal>” symbol.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
91 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
92
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
93 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
94 The resulting value can be a string
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
95 or another variable (0.9.0).
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
96 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
97
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
98 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
99 The directive also supports three special parameters:
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 <list type="tag">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 <tag-name><literal>default</literal> <value>value</value></tag-name>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 <tag-desc>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
103 sets the resulting value if the source value matches none
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
104 of the specified variants.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
105 When <literal>default</literal> is not specified, the default
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
106 resulting value will be an empty string.
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 <tag-name><literal>hostnames</literal></tag-name>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 <tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 allows to specify hostnames with a prefix or suffix mask, as source
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 values, for example,
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 *.example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 example.* 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 The following two records
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 *.example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 can be combined:
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 .example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 </example>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
126 This parameter should be specified before the list of values.
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 <tag-name><literal>include</literal> <value>file</value></tag-name>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 <tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 includes a file with values.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 There can be several inclusions.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 </list>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
138 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
139 If the source value matches more than one of the specified variants,
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
140 e.g. both mask and regular expression match, the first matching
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
141 variant will be choosen, in the following order of precedence:
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
142 <list type="enum">
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
143
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
144 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
145 string value without a mask
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
146 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
147
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
148 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
149 longest string value with a prefix mask,
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
150 e.g. “<literal>*.example.com</literal>”
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
151 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
152
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
153 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
154 longest string value with a suffix mask,
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
155 e.g. “<literal>mail.*</literal>”
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
156 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
157
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
158 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
159 first matching regular expression
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
160 (in order of appearance in a configuration file)
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
161 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
162
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
163 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
164 default value
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
165 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
166
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
167 </list>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
168 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
169
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
170 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
172
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 <directive name="map_hash_bucket_size">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174 <syntax><value>size</value></syntax>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175 <default>32|64|128</default>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
179 Sets the bucket size for the <link id="map"/> variables hash tables.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 Default value depends on the size of the processor's cache line.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 For more information, please refer to
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 <link doc="../hash.xml">Setting Up Hashes</link>.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
188 <directive name="map_hash_max_size">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189 <syntax><value>size</value></syntax>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
190 <default>2048</default>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
191 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
192
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
193 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194 Sets the maximum <value>size</value> of the <link id="map"/> variables
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195 hash tables.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 For more information, please refer to
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197 <link doc="../hash.xml">Setting Up Hashes</link>.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
198 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
199
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
200 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
201
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
202 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
204 </module>