Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_geo_module.xml @ 797:55b633342309
Documented "geo" support of IPv6 address prefixes.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 26 Dec 2012 05:05:29 +0000 |
parents | 753ed7df8910 |
children | 9dab69f2b71d |
comparison
equal
deleted
inserted
replaced
796:a2f75649204c | 797:55b633342309 |
---|---|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
9 | 9 |
10 <module name="Module ngx_http_geo_module" | 10 <module name="Module ngx_http_geo_module" |
11 link="/en/docs/http/ngx_http_geo_module.html" | 11 link="/en/docs/http/ngx_http_geo_module.html" |
12 lang="en" | 12 lang="en" |
13 rev="3"> | 13 rev="4"> |
14 | 14 |
15 <section id="summary"> | 15 <section id="summary"> |
16 | 16 |
17 <para> | 17 <para> |
18 The <literal>ngx_http_geo_module</literal> module creates variables | 18 The <literal>ngx_http_geo_module</literal> module creates variables |
26 | 26 |
27 <para> | 27 <para> |
28 <example> | 28 <example> |
29 geo $geo { | 29 geo $geo { |
30 default 0; | 30 default 0; |
31 127.0.0.1/32 2; | 31 |
32 127.0.0.1 2; | |
32 192.168.1.0/24 1; | 33 192.168.1.0/24 1; |
33 10.1.0.0/16 1; | 34 10.1.0.0/16 1; |
35 | |
36 ::1 2; | |
37 2001:0db8::/32 1; | |
34 } | 38 } |
35 </example> | 39 </example> |
36 </para> | 40 </para> |
37 | 41 |
38 </section> | 42 </section> |
69 If the value of a variable does not represent a valid IP address | 73 If the value of a variable does not represent a valid IP address |
70 then the “<literal>255.255.255.255</literal>” address is used. | 74 then the “<literal>255.255.255.255</literal>” address is used. |
71 </para> | 75 </para> |
72 | 76 |
73 <para> | 77 <para> |
74 Addresses are specified as CIDR or ranges (0.7.23). | 78 Addresses are specified either as prefixes in CIDR notation |
79 (including individual addresses) or as ranges (0.7.23). | |
80 <note> | |
81 IPv6 prefixes are supported starting from version 1.3.10. | |
82 </note> | |
83 </para> | |
84 | |
85 <para> | |
75 The following special parameters are also supported: | 86 The following special parameters are also supported: |
76 <list type="tag"> | 87 <list type="tag"> |
77 | 88 |
78 <tag-name><literal>delete</literal></tag-name> | 89 <tag-name><literal>delete</literal></tag-name> |
79 <tag-desc> | 90 <tag-desc> |
82 | 93 |
83 <tag-name><literal>default</literal></tag-name> | 94 <tag-name><literal>default</literal></tag-name> |
84 <tag-desc> | 95 <tag-desc> |
85 a value of variable if the client address does not | 96 a value of variable if the client address does not |
86 match any of the specified addresses. | 97 match any of the specified addresses. |
87 When CIDR is used, “<literal>0.0.0.0/0</literal>” can be written | 98 When addresses are specified in CIDR notation, |
88 instead of <literal>default</literal>. | 99 “<literal>0.0.0.0/0</literal>” and “<literal>::/0</literal>” |
100 can be used instead of <literal>default</literal>. | |
89 When <literal>default</literal> is not specified, the default | 101 When <literal>default</literal> is not specified, the default |
90 value will be an empty string. | 102 value will be an empty string. |
91 </tag-desc> | 103 </tag-desc> |
92 | 104 |
93 <tag-name><literal>include</literal></tag-name> | 105 <tag-name><literal>include</literal></tag-name> |
103 an address from the <header>X-Forwarded-For</header> request | 115 an address from the <header>X-Forwarded-For</header> request |
104 header field will be used instead. | 116 header field will be used instead. |
105 In contrast to the regular addresses, trusted addresses are | 117 In contrast to the regular addresses, trusted addresses are |
106 checked sequentially. | 118 checked sequentially. |
107 <note> | 119 <note> |
108 IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1. | 120 Trusted IPv6 addresses are supported starting from versions 1.3.0 and 1.2.1. |
109 </note> | 121 </note> |
110 </tag-desc> | 122 </tag-desc> |
111 | 123 |
112 <tag-name><literal>proxy_recursive</literal></tag-name> | 124 <tag-name><literal>proxy_recursive</literal></tag-name> |
113 <tag-desc> | 125 <tag-desc> |