Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_map_module.xml @ 2438:86b0dd6e7208
Updated API version in njs examples.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 03 Oct 2019 13:53:34 +0300 |
parents | c6b5826b64f7 |
children |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
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 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 |
346 | 10 <module name="Модуль ngx_http_map_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_map_module.html" |
589 | 12 lang="ru" |
1868
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
13 rev="5"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
108
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
346 | 18 Модуль <literal>ngx_http_map_module</literal> создаёт переменные, |
19 значения которых зависят от значений других переменных. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
24 |
346 | 25 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 <example> |
385
aef88cb1d75c
Removed extraneous whitespace.
Ruslan Ermilov <ru@nginx.com>
parents:
346
diff
changeset
|
29 map $http_host $name { |
346 | 30 hostnames; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 |
346 | 32 default 0; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 |
346 | 34 example.com 1; |
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; |
346 | 39 wap.* 4; |
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 } |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
346 | 52 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 <directive name="map"> |
346 | 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>строка</value> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
57 <value>$переменная</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
58 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
60 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
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 Создаёт новую переменную, значение которой |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
63 зависит от значений одной или более исходных переменных, |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
64 указанных в первом параметре. |
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 До версии 0.9.0 в качестве первого параметра можно было |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
67 указать только одну переменную. |
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> |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
73 Поскольку переменные вычисляются только в момент использования, |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
74 само по себе наличие даже большого числа объявлений переменных |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
75 “<literal>map</literal>” не влечёт за собой никаких дополнительных |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
76 расходов на обработку запросов. |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
77 </note> |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
78 </para> |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
79 |
ec33576efaa5
Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
80 <para> |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
81 Параметры внутри блока <literal>map</literal> задают соответствие |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
82 между исходными и результирующими значениями. |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
83 </para> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
84 |
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 Исходные значения задаются строками или регулярными выражениями (0.9.6). |
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 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
89 <para> |
1652
68b647a96448
Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents:
716
diff
changeset
|
90 Строки проверяются без учёта регистра. |
68b647a96448
Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents:
716
diff
changeset
|
91 </para> |
68b647a96448
Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents:
716
diff
changeset
|
92 |
68b647a96448
Documented that "map" does a caseless string comparison.
Ruslan Ermilov <ru@nginx.com>
parents:
716
diff
changeset
|
93 <para> |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
94 Перед регулярным выражением ставится символ “<literal>~</literal>”, |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
95 если при сравнении следует учитывать регистр символов, либо символы |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
96 “<literal>~*</literal>” (1.0.4), если регистр символов учитывать не нужно. |
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 которые могут затем использоваться в других директивах совместно с |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
99 результирующей переменной. |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
100 </para> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
101 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
102 <para> |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
103 Если исходное значение совпадает с именем одного из специальных параметров, |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
104 описанных ниже, перед ним следует поставить символ “<literal>\</literal>”. |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
105 </para> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
106 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
107 <para> |
1703
8aa362a99f7c
Documented support for complex values in resulting strings in map.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1652
diff
changeset
|
108 В качестве результирующего значения можно указать текст, |
8aa362a99f7c
Documented support for complex values in resulting strings in map.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1652
diff
changeset
|
109 переменную (0.9.0) и их комбинации (1.11.0). |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
110 </para> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
111 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
112 <para> |
1868
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
113 Также поддерживаются следующие специальные параметры: |
346 | 114 <list type="tag"> |
115 <tag-name><literal>default</literal> <value>значение</value></tag-name> | |
116 <tag-desc> | |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
117 задаёт результирующее значение, если исходное значение не |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
118 совпадает ни с одним из перечисленных. |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
119 Если параметр <literal>default</literal> не указан, результирующим значением |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
120 по умолчанию будет пустая строка. |
346 | 121 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
122 |
346 | 123 <tag-name><literal>hostnames</literal></tag-name> |
124 <tag-desc> | |
125 указывает, что в качестве исходных значений можно | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 использовать маску для первой или последней части имени хоста, например, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 <example> |
346 | 128 *.example.com 1; |
129 example.* 1; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 Вместо двух записей |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
132 <example> |
346 | 133 example.com 1; |
134 *.example.com 1; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 </example> |
346 | 136 можно использовать одну: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
137 <example> |
346 | 138 .example.com 1; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
139 </example> |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
140 Этот параметр следует указывать перед списком значений. |
346 | 141 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 |
346 | 143 <tag-name><literal>include</literal> <value>файл</value></tag-name> |
144 <tag-desc> | |
145 включает файл со значениями. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
146 Включений может быть несколько. |
346 | 147 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
148 |
1868
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
149 <tag-name id="volatile"><literal>volatile</literal></tag-name> |
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
150 <tag-desc> |
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
151 указывает, что переменная не кэшируется (1.11.7). |
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
152 </tag-desc> |
c6b5826b64f7
Documented the "volatile" parameter of the "map" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1703
diff
changeset
|
153 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
154 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
155 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
156 |
572
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
157 <para> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
158 Если исходному значению соответствует несколько из указанных вариантов, |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
159 например, одновременно подходят и маска, и регулярное выражение, |
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 <list type="enum"> |
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 строковое значение без маски |
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 <listitem> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
168 самое длинное строковое значение с маской в начале, |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
169 например “<literal>*.example.com</literal>” |
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 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
172 <listitem> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
173 самое длинное строковое значение с маской в конце, |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
174 например “<literal>mail.*</literal>” |
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 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
177 <listitem> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
178 первое подходящее регулярное выражение |
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 |
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 значение по умолчанию (<literal>default</literal>) |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
184 </listitem> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
185 |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
186 </list> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
187 </para> |
17ceffcc7ffb
Brought the ngx_http_map_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
490
diff
changeset
|
188 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
189 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
190 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
191 |
346 | 192 <directive name="map_hash_bucket_size"> |
193 <syntax><value>размер</value></syntax> | |
194 <default>32|64|128</default> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
195 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
196 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
197 <para> |
346 | 198 Задаёт размер корзины в хэш-таблицах для переменных <link id="map"/>. |
199 Значение по умолчанию зависит от размера строки кэша процессора. | |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
200 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
201 <link doc="../hash.xml">документе</link>. |
98 | 202 </para> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
203 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
204 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
205 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
206 |
346 | 207 <directive name="map_hash_max_size"> |
208 <syntax><value>размер</value></syntax> | |
209 <default>2048</default> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
210 <context>http</context> |
98 | 211 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
212 <para> |
346 | 213 Задаёт максимальный размер хэш-таблиц для переменных <link id="map"/>. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
214 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
215 <link doc="../hash.xml">документе</link>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
216 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
217 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
218 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
219 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
220 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
221 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
222 </module> |