annotate xml/en/docs/http/ngx_http_map_module.xml @ 2769:16f6fa718be2

Updated TLSv1.3 support notes. Previous notes described some early development snapshot of OpenSSL 1.1.1 with disabled TLSv1.3 by default. It was then enabled in the first alpha. Further, the updated text covers later major releases such as OpenSSL 3.0.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 30 Sep 2021 16:29:20 +0300
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
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"
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: 1712
diff changeset
13 rev="5">
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>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 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
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>
385
aef88cb1d75c Removed extraneous whitespace.
Ruslan Ermilov <ru@nginx.com>
parents: 348
diff changeset
29 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
30 hostnames;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 default 0;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 *.example.com 1;
490
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.org 2;
9913f1d51c07 Replaced "nginx" domain names with example domains.
Ruslan Ermilov <ru@nginx.com>
parents: 385
diff changeset
38 .example.net 3;
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 wap.* 4;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 }
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
41
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
42 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
43 default 0;
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
44 "~Opera Mini" 1;
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
45 }
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 </section>
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
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52 <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
53
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54 <directive name="map">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 <syntax block="yes">
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
56 <value>string</value>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
57 <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
58 <default/>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
62 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
63 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
64 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
65 <note>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
66 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
67 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
68 </note>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
69 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
70
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
71 <para>
714
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
72 <note>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
73 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
74 even of a large number of “<literal>map</literal>” variables
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
75 does not add any extra costs to request processing.
714
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
76 </note>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
77 </para>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
78
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 659
diff changeset
79 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
80 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
81 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
82 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
83
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
84 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
85 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
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>
1652
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
89 Strings are matched ignoring the case.
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
90 </para>
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
91
68b647a96448 Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents: 966
diff changeset
92 <para>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
93 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
94 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
95 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
96 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
97 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
98 resulting variable.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
99 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
100
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
101 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
102 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
103 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
104 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
105
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
106 <para>
1703
8aa362a99f7c Documented support for complex values in resulting strings in map.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1652
diff changeset
107 The resulting value can contain text,
1712
5ee34b8faa79 Removed duplicated dot.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1703
diff changeset
108 variable (0.9.0), and their combination (1.11.0).
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
109 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
110
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
111 <para>
1868
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
112 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
113 <list type="tag">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 <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
115 <tag-desc>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
116 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
117 of the specified variants.
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
118 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
119 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
120 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 <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
123 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
124 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
125 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 *.example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 example.* 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 The following two records
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 *.example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134 can be combined:
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 .example.com 1;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 </example>
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
138 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
139 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 <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
142 <tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 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
144 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
145 </tag-desc>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146
1868
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
147 <tag-name id="volatile"><literal>volatile</literal></tag-name>
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
148 <tag-desc>
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
149 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: 1712
diff changeset
150 </tag-desc>
c6b5826b64f7 Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1712
diff changeset
151
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152 </list>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154
572
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
155 <para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
156 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
157 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
158 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
159 <list type="enum">
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 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
163 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
164
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 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
167 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
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 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
171 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
172 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
173 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
174
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
175 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
176 first matching regular expression
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
177 (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
178 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
179
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
180 <listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
181 default value
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
182 </listitem>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
183
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
184 </list>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
185 </para>
17ceffcc7ffb Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 490
diff changeset
186
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
188
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 <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
191 <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
192 <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
193 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 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
197 Default value depends on the processor’s cache line size.
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
198 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
199 <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
200 </para>
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 </directive>
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
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
205 <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
206 <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
207 <default>2048</default>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
208 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
210 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
211 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
212 hash tables.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 716
diff changeset
213 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
214 <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
215 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
216
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
217 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
218
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
219 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221 </module>