Mercurial > hg > nginx-site
comparison xml/ru/docs/http/ngx_http_map_module.xml @ 76:4a4caa566120
Russian documentation import.
Changes in module.dtd: <example> now allowed to contain <value> and
<emphasis> elements (we need this to show important parts in examples),
less strict checking of <directive> syntax (we don't want to fully
document some directives, notably deprecated ones).
Known issues:
1. <syntax> elements are preserved as is, they will require manual conversion
(likely to some not-yet-existed format a la DocBook cmdsynopsis, as
currently used one seems to be incomplete);
2. <value> no longer corresponds to replaceable content, and it's use in
examples isn't correct;
3. <link doc="document#fragment"> doesn't work with current xslt, either
should be supported or changed to <link doc="document" id="fragment">.
The following files are intentionally omitted: maillists.xml (support.xml
should be used instead), experimental.xml (obsolete), faq.xml (conflicts
with existing one, needs discussion).
Not yet linked to site.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 11 Oct 2011 12:57:50 +0000 |
parents | |
children | a10bc0cb0a6a |
comparison
equal
deleted
inserted
replaced
75:2bf4cd2787c5 | 76:4a4caa566120 |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Директивы модуля ngx_http_map_module" | |
6 link="/ru/docs/http/ngx_http_map_module.html" | |
7 lang="ru"> | |
8 | |
9 <section name="" id="summary"> | |
10 | |
11 <para> | |
12 Модуль ngx_http_map_module создаёт переменные, значение которых | |
13 зависят от значения других переменных. | |
14 </para> | |
15 | |
16 </section> | |
17 | |
18 | |
19 <section name="Пример конфигурации" id="example"> | |
20 | |
21 <para> | |
22 <example> | |
23 map $http_host $name { | |
24 hostnames; | |
25 | |
26 default 0; | |
27 | |
28 example.com 1; | |
29 *.example.com 1; | |
30 test.com 2; | |
31 *.test.com 2; | |
32 .site.com 3; | |
33 wap.* 4; | |
34 } | |
35 </example> | |
36 </para> | |
37 | |
38 </section> | |
39 | |
40 | |
41 <section name="Директивы" id="directives"> | |
42 | |
43 <directive name="map"> | |
44 <syntax>map <value>$переменная1 $переменная2 { ... }</value></syntax> | |
45 <default>нет</default> | |
46 <context>http</context> | |
47 | |
48 <para> | |
49 Директива создаёт переменную, значение которой | |
50 зависит от значения исходной переменной. | |
51 Директива поддерживает три специальных параметра: | |
52 <list type="bullet"> | |
53 <listitem> | |
54 default — задаёт значение для второй переменной, если значение | |
55 первой переменной не найдено. | |
56 </listitem> | |
57 | |
58 <listitem> | |
59 hostnames — указывает, что в качестве исходных значений можно | |
60 использовать маску для первой или последней части имени хоста, например, | |
61 <example> | |
62 *.example.com 1; | |
63 example.* 1; | |
64 </example> | |
65 Вместо двух записей | |
66 <example> | |
67 example.com 1; | |
68 *.example.com 1; | |
69 </example> | |
70 можно использовать одну | |
71 <example> | |
72 .example.com 1; | |
73 </example> | |
74 </listitem> | |
75 | |
76 <listitem> | |
77 include — включает файл со значениями. | |
78 Включений может быть несколько. | |
79 </listitem> | |
80 | |
81 </list> | |
82 </para> | |
83 | |
84 </directive> | |
85 | |
86 | |
87 <directive name="map_hash_max_size"> | |
88 <syntax>map_hash_max_size <value>число</value></syntax> | |
89 <default>map_hash_max_size 2048</default> | |
90 <context>http</context> | |
91 | |
92 <para> | |
93 Директива задаёт максимальный размер хэш-таблиц для переменных map. | |
94 Подробнее смотри в <link doc="../hash.xml">описании | |
95 настройки хэшей</link>. | |
96 </para> | |
97 | |
98 </directive> | |
99 | |
100 | |
101 <directive name="map_hash_bucket_size"> | |
102 <syntax>map_hash_bucket_size <value>число</value></syntax> | |
103 <default>map_hash_bucket_size 32/64/128</default> | |
104 <context>http</context> | |
105 | |
106 <para> | |
107 Директива задаёт размер корзины в хэш-таблицах для переменных map. | |
108 Значение по умолчанию зависит от размера строки кэша процессора. | |
109 Подробнее смотри в <link doc="../hash.xml">описании | |
110 настройки хэшей</link>. | |
111 </para> | |
112 | |
113 </directive> | |
114 | |
115 </section> | |
116 | |
117 </module> |