Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_geoip_module.xml @ 732:cea4732f6843
The stale note about ngx_http_rewrite_module experimental status removed.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Tue, 16 Oct 2012 12:44:45 +0000 |
parents | 3cc1c7bb0674 |
children | c66610f9a53f |
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:
523
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
523
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_geoip_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_geoip_module.html" |
589 | 12 lang="ru" |
13 rev="1"> | |
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:
102
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_geoip_module</literal> (0.8.6+) создаёт переменные, |
19 значения которых зависят от IP-адреса клиента, используя готовые базы данных | |
20 <link url="http://www.maxmind.com">MaxMind</link>. | |
21 </para> | |
22 | |
23 <para> | |
24 По умолчанию этот модуль не собирается, его сборку необходимо | |
25 разрешить с помощью конфигурационного параметра | |
26 <literal>--with-http_geoip_module</literal>. | |
27 <note> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 Для сборки и работы этого модуля нужна библиотека |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 <link url="http://www.maxmind.com/app/c">MaxMind GeoIP</link>. |
346 | 30 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 |
346 | 36 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 http { |
518 | 41 geoip_country GeoIP.dat; |
42 geoip_city GeoLiteCity.dat; | |
43 geoip_proxy 192.168.100.0/24; | |
44 geoip_proxy 2001:0db8::/32; | |
45 geoip_proxy_recursive on; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 |
346 | 53 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 <directive name="geoip_country"> |
689
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
56 <syntax><value>файл</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
57 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
60 <para> |
346 | 61 Задаёт базу данных для определения страны в зависимости |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
62 от значения IP-адреса клиента. |
346 | 63 При использовании этой базы данных доступны следующие переменные: |
64 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 |
346 | 66 <tag-name><var>$geoip_country_code</var></tag-name> |
67 <tag-desc> | |
68 двухбуквенный код страны, например, | |
69 “<literal>RU</literal>”, “<literal>US</literal>”. | |
70 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 |
346 | 72 <tag-name><var>$geoip_country_code3</var></tag-name> |
73 <tag-desc> | |
74 трёхбуквенный код страны, например, | |
75 “<literal>RUS</literal>”, “<literal>USA</literal>”. | |
76 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 |
346 | 78 <tag-name><var>$geoip_country_name</var></tag-name> |
79 <tag-desc> | |
80 название страны, например, | |
81 “<literal>Russian Federation</literal>”, “<literal>United States</literal>”. | |
82 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
85 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
88 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
89 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
90 <directive name="geoip_city"> |
689
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
91 <syntax><value>файл</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
92 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
94 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 <para> |
346 | 96 Задаёт базу данных для определения страны, региона и города |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 в зависимости от значения IP-адреса клиента. |
346 | 98 При использовании этой базы данных доступны следующие переменные: |
99 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
100 |
346 | 101 <tag-name><var>$geoip_city_country_code</var></tag-name> |
102 <tag-desc> | |
103 двухбуквенный код страны, например, | |
104 “<literal>RU</literal>”, “<literal>US</literal>”. | |
105 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
106 |
346 | 107 <tag-name><var>$geoip_city_country_code3</var></tag-name> |
108 <tag-desc> | |
109 трёхбуквенный код страны, например, | |
110 “<literal>RUS</literal>”, “<literal>USA</literal>”. | |
111 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 |
346 | 113 <tag-name><var>$geoip_city_country_name</var></tag-name> |
114 <tag-desc> | |
115 название страны, например, | |
116 “<literal>Russian Federation</literal>”, “<literal>United States</literal>”. | |
117 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
118 |
346 | 119 <tag-name><var>$geoip_region</var></tag-name> |
120 <tag-desc> | |
121 название региона страны (область, край, штат, | |
122 провинция, федеральная земля и тому подобное), например, | |
123 “<literal>Moscow City</literal>”, “<literal>DC</literal>”. | |
124 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 |
346 | 126 <tag-name><var>$geoip_city</var></tag-name> |
127 <tag-desc> | |
128 название города, например, | |
129 “<literal>Moscow</literal>”, “<literal>Washington</literal>”. | |
130 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 |
346 | 132 <tag-name><var>$geoip_postal_code</var></tag-name> |
133 <tag-desc> | |
134 почтовый индекс. | |
135 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
136 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
137 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
138 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
139 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
140 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
141 |
518 | 142 |
689
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
143 <directive name="geoip_org"> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
144 <syntax><value>файл</value></syntax> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
145 <default/> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
146 <context>http</context> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
147 <appeared-in>1.0.3</appeared-in> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
148 |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
149 <para> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
150 Задаёт базу данных для определения названия организации |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
151 в зависимости от значения IP-адреса клиента. |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
152 При использовании этой базы данных доступна следующая переменная: |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
153 <list type="tag"> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
154 |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
155 <tag-name><var>$geoip_org</var></tag-name> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
156 <tag-desc> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
157 название организации, например, “The University of Melbourne”. |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
158 </tag-desc> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
159 |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
160 </list> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
161 </para> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
162 |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
163 </directive> |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
164 |
3cc1c7bb0674
Documented geoip_org directive and fixed parameter names
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
165 |
518 | 166 <directive name="geoip_proxy"> |
167 <syntax><value>адрес</value> | <value>CIDR</value></syntax> | |
168 <default/> | |
169 <context>http</context> | |
170 <appeared-in>1.3.0</appeared-in> | |
523 | 171 <appeared-in>1.2.1</appeared-in> |
518 | 172 |
173 <para> | |
174 Задаёт доверенные адреса, при запросе с которых будет использоваться | |
175 адрес в переданном поле заголовка запроса <header>X-Forwarded-For</header>. | |
176 </para> | |
177 | |
178 </directive> | |
179 | |
180 | |
181 <directive name="geoip_proxy_recursive"> | |
182 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
183 <default>off</default> | |
184 <context>http</context> | |
185 <appeared-in>1.3.0</appeared-in> | |
523 | 186 <appeared-in>1.2.1</appeared-in> |
518 | 187 |
188 <para> | |
189 При выключенном рекурсивном поиске вместо исходного адреса клиента, | |
190 совпадающего с одним из доверенных адресов, будет использоваться последний | |
191 адрес, переданный в <header>X-Forwarded-For</header>. | |
192 При включённом рекурсивном поиске вместо исходного адреса клиента, | |
193 совпадающего с одним из доверенных адресов, будет использоваться последний | |
194 не доверенный адрес, переданный в <header>X-Forwarded-For</header>. | |
195 </para> | |
196 | |
197 </directive> | |
198 | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
199 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
200 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
201 </module> |