annotate xml/en/docs/stream/ngx_stream_map_module.xml @ 3011:55d49eb065ac

Fixed example in the js_periodic directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 14 Sep 2023 16:38:00 +0100
parents c6b5826b64f7
children
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
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
10 <module name="Module ngx_stream_map_module"
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
11 link="/en/docs/stream/ngx_stream_map_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
12 lang="en"
1868
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
13 rev="2">
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <section id="summary">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 <para>
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
18 The <literal>ngx_stream_map_module</literal> module (1.11.2) creates variables
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 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
20 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 </section>
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
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 <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
26
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 <example>
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
29 map $remote_addr $limit {
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
30 127.0.0.1 "";
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
31 default $binary_remote_addr;
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 }
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
33
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
34 limit_conn_zone $limit zone=addr:10m;
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
35 limit_conn addr 1;
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 <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
43
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 <directive name="map">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 <syntax block="yes">
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
46 <value>string</value>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
47 <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
48 <default/>
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
49 <context>stream</context>
348
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 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
52 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
53 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
54 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
55 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
56
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
57 <para>
714
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
58 <note>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
59 Since variables are evaluated only when they are used, the mere declaration
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
60 even of a large number of “<literal>map</literal>” variables
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
61 does not add any extra costs to connection processing.
714
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
62 </note>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
63 </para>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
64
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
65 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
66 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
67 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
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>
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
71 Source values are specified as strings or regular expressions.
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
72 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
73
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
74 <para>
1652
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
75 Strings are matched ignoring the case.
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
76 </para>
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
77
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
78 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
79 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
80 symbol for a case-sensitive matching, or from the “<literal>~*</literal>”
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
81 symbols for case-insensitive matching.
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
82 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
83 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
84 resulting variable.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
85 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
86
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
87 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
88 If a source value matches one of the names of special parameters
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 627
diff changeset
89 described below, it should be prefixed with the “<literal>\</literal>” symbol.
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
90 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
91
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
92 <para>
1703
8aa362a99f7c Documented support for complex values in resulting strings in map.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1652
diff changeset
93 The resulting value can contain text,
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
94 variable, and their combination.
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
95 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
96
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
97 <para>
1868
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
98 The following special parameters are also supported:
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 <list type="tag">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 <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
101 <tag-desc>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
102 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
103 of the specified variants.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
104 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
105 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
106 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 <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
109 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
110 indicates that source values can be hostnames with a prefix or suffix mask:
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 *.example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 example.* 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 The following two records
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 example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 *.example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 can be combined:
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 .example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 </example>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
124 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
125 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 <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
128 <tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 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
130 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
131 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132
1868
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
133 <tag-name id="volatile"><literal>volatile</literal></tag-name>
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
134 <tag-desc>
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
135 indicates that the variable is not cacheable (1.11.7).
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
136 </tag-desc>
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1743
diff changeset
137
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 </list>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
141 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
142 If the source value matches more than one of the specified variants,
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
143 e.g. both a mask and a regular expression match, the first matching
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
144 variant will be chosen, in the following order of priority:
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
145 <list type="enum">
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
146
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
147 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
148 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
149 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
150
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 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
153 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
154 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
155
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 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
158 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
159 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
160
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 first matching regular expression
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
163 (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
164 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
165
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
166 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
167 default value
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
168 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
169
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
170 </list>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
171 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
172
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 <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
177 <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
178 <default>32|64|128</default>
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
179 <context>stream</context>
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182 Sets the bucket size for the <link id="map"/> variables hash tables.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
183 Default value depends on the processor’s cache line size.
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
184 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 627
diff changeset
185 <link doc="../hash.xml">document</link>.
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186 </para>
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>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
190
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
191 <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
192 <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
193 <default>2048</default>
1743
3d686cb47c2c Documented the map module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
194 <context>stream</context>
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197 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
198 hash tables.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
199 The details of setting up hash tables are provided in a separate
659
77a3314c74a7 Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents: 627
diff changeset
200 <link doc="../hash.xml">document</link>.
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
201 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
202
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
204
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
205 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
206
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
207 </module>