annotate xml/en/docs/stream/ngx_stream_geo_module.xml @ 1751:3768eb3d9c6c

Documented the geo module in stream.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 14 Jul 2016 20:33:05 +0300
parents xml/en/docs/http/ngx_http_geo_module.xml@95c3c3bbf1ce
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
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) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
5 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 523
diff changeset
6
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
9 <module name="Module ngx_stream_geo_module"
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
10 link="/en/docs/stream/ngx_stream_geo_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
11 lang="en"
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
12 rev="1">
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
13
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14 <section id="summary">
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16 <para>
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
17 The <literal>ngx_stream_geo_module</literal> module (1.11.3) creates variables
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 840
diff changeset
18 with values depending on the client IP address.
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21 </section>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 <section id="example" name="Example Configuration">
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 <para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27 <example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 geo $geo {
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 default 0;
797
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
30
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
31 127.0.0.1 2;
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32 192.168.1.0/24 1;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 10.1.0.0/16 1;
797
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
34
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
35 ::1 2;
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
36 2001:0db8::/32 1;
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 }
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 </example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 </section>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44 <section id="directives" name="Directives">
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 <directive name="geo">
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47 <syntax block="yes">[<value>$address</value>] <value>$variable</value></syntax>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 <default/>
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
49 <context>stream</context>
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51 <para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52 Describes the dependency of values of the specified variable
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 on the client IP address.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 840
diff changeset
54 By default, the address is taken from the <var>$remote_addr</var> variable,
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
55 but it can also be taken from another variable, for example:
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 <example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 geo $arg_remote_addr $geo {
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58 ...;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 }
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60 </example>
714
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
61 </para>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
62
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
63 <para>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
64 <note>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
65 Since variables are evaluated only when used, the mere existence
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
66 of even a large number of declared “<literal>geo</literal>” variables
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
67 does not cause any extra costs for connection processing.
714
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
68 </note>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
69 </para>
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
70
ec33576efaa5 Added note about minimal impact of declaring multiple variables (geo, map).
Vladimir Homutov <vl@nginx.com>
parents: 589
diff changeset
71 <para>
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 If the value of a variable does not represent a valid IP address
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 then the “<literal>255.255.255.255</literal>” address is used.
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 <para>
797
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
77 Addresses are specified either as prefixes in CIDR notation
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
78 (including individual addresses) or as ranges.
797
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
79 </para>
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
80
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
81 <para>
518
65750bdde8fb Documented recent changes.
Ruslan Ermilov <ru@nginx.com>
parents: 369
diff changeset
82 The following special parameters are also supported:
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83 <list type="tag">
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85 <tag-name><literal>delete</literal></tag-name>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 <tag-desc>
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
87 deletes the specified network.
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 </tag-desc>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 <tag-name><literal>default</literal></tag-name>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 840
diff changeset
92 a value set to the variable if the client address does not
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 match any of the specified addresses.
797
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
94 When addresses are specified in CIDR notation,
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
95 “<literal>0.0.0.0/0</literal>” and “<literal>::/0</literal>”
55b633342309 Documented "geo" support of IPv6 address prefixes.
Ruslan Ermilov <ru@nginx.com>
parents: 788
diff changeset
96 can be used instead of <literal>default</literal>.
788
753ed7df8910 Documented what will be the default value of "geo" if "default" isn't set.
Ruslan Ermilov <ru@nginx.com>
parents: 716
diff changeset
97 When <literal>default</literal> is not specified, the default
753ed7df8910 Documented what will be the default value of "geo" if "default" isn't set.
Ruslan Ermilov <ru@nginx.com>
parents: 716
diff changeset
98 value will be an empty string.
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 </tag-desc>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 <tag-name><literal>include</literal></tag-name>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 <tag-desc>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 includes a file with addresses and values.
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 There can be several inclusions.
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 </tag-desc>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <tag-name><literal>ranges</literal></tag-name>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 <tag-desc>
1751
3768eb3d9c6c Documented the geo module in stream.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
109 indicates that addresses are specified as ranges.
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 This parameter should be the first.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 840
diff changeset
111 To speed up loading of a geo base, addresses should be put in ascending order.
369
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 </tag-desc>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 </list>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 <para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 Example:
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 <example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 geo $country {
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121 default ZZ;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 include conf/geo.conf;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 delete 127.0.0.0/16;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 127.0.0.0/24 US;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 127.0.0.1/32 RU;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 10.1.0.0/16 RU;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128 192.168.1.0/24 UK;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 }
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 </example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 <para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134 The <path>conf/geo.conf</path> file could contain the following lines:
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 <example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 10.2.0.0/16 RU;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 192.168.2.0/24 RU;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 </example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 <para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142 A value of the most specific match is used.
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 For example, for the 127.0.0.1 address the value “<literal>RU</literal>”
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144 will be chosen, not “<literal>US</literal>”.
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147 <para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 Example with ranges:
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
149 <example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 geo $country {
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151 ranges;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152 default ZZ;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 127.0.0.0-127.0.0.0 US;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
154 127.0.0.1-127.0.0.1 RU;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
155 127.0.0.1-127.0.0.255 US;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
156 10.1.0.0-10.1.255.255 RU;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157 192.168.1.0-192.168.1.255 UK;
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158 }
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
159 </example>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
160 </para>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
161
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
162 </directive>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
163
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 </section>
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165
68d9e5f2ea81 English translation of ngx_http_geo_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
166 </module>