Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_geoip_module.xml @ 348:5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
ngx_http_realip_module, ngx_http_secure_link_module,
ngx_http_split_clients_module, and ngx_http_sub_module.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 Jan 2012 16:50:35 +0000 |
parents | |
children | 65750bdde8fb |
comparison
equal
deleted
inserted
replaced
347:daae2b619815 | 348:5a848934a12d |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Module ngx_http_geoip_module" | |
6 link="/en/docs/http/ngx_http_geoip_module.html" | |
7 lang="en"> | |
8 | |
9 <section id="summary"> | |
10 | |
11 <para> | |
12 The <literal>ngx_http_geoip_module</literal> module (0.8.6+) creates variables | |
13 whose values depend on the client IP address, using the precompiled | |
14 <link url="http://www.maxmind.com">MaxMind</link> databases. | |
15 </para> | |
16 | |
17 <para> | |
18 This module is not built by default, it should be enabled with the | |
19 <literal>--with-http_geoip_module</literal> | |
20 configuration parameter. | |
21 <note> | |
22 This module requires the | |
23 <link url="http://www.maxmind.com/app/c">MaxMind GeoIP</link> library. | |
24 </note> | |
25 </para> | |
26 | |
27 </section> | |
28 | |
29 | |
30 <section id="example" name="Example Configuration"> | |
31 | |
32 <para> | |
33 <example> | |
34 http { | |
35 geoip_country GeoIP.dat; | |
36 geoip_city GeoLiteCity.dat; | |
37 ... | |
38 </example> | |
39 </para> | |
40 | |
41 </section> | |
42 | |
43 | |
44 <section id="directives" name="Directives"> | |
45 | |
46 <directive name="geoip_country"> | |
47 <syntax><value>database</value></syntax> | |
48 <default/> | |
49 <context>http</context> | |
50 | |
51 <para> | |
52 Specifies a database used to determine a country | |
53 depending on the client IP address. | |
54 The following variables are available when using this database: | |
55 <list type="tag"> | |
56 | |
57 <tag-name><var>$geoip_country_code</var></tag-name> | |
58 <tag-desc> | |
59 two-letter country code, for example, | |
60 “<literal>RU</literal>”, “<literal>US</literal>”. | |
61 </tag-desc> | |
62 | |
63 <tag-name><var>$geoip_country_code3</var></tag-name> | |
64 <tag-desc> | |
65 three-letter country code, for example, | |
66 “<literal>RUS</literal>”, “<literal>USA</literal>”. | |
67 </tag-desc> | |
68 | |
69 <tag-name><var>$geoip_country_name</var></tag-name> | |
70 <tag-desc> | |
71 country name, for example, | |
72 “<literal>Russian Federation</literal>”, “<literal>United States</literal>”. | |
73 </tag-desc> | |
74 | |
75 </list> | |
76 </para> | |
77 | |
78 </directive> | |
79 | |
80 | |
81 <directive name="geoip_city"> | |
82 <syntax><value>database</value></syntax> | |
83 <default/> | |
84 <context>http</context> | |
85 | |
86 <para> | |
87 Specifies a database used to determine a country, region, and city | |
88 depending on the client IP address. | |
89 The following variables are available when using this database: | |
90 <list type="tag"> | |
91 | |
92 <tag-name><var>$geoip_city_country_code</var></tag-name> | |
93 <tag-desc> | |
94 two-letter country code, for example, | |
95 “<literal>RU</literal>”, “<literal>US</literal>”. | |
96 </tag-desc> | |
97 | |
98 <tag-name><var>$geoip_city_country_code3</var></tag-name> | |
99 <tag-desc> | |
100 three-letter country code, for example, | |
101 “<literal>RUS</literal>”, “<literal>USA</literal>”. | |
102 </tag-desc> | |
103 | |
104 <tag-name><var>$geoip_city_country_name</var></tag-name> | |
105 <tag-desc> | |
106 country name, for example, | |
107 “<literal>Russian Federation</literal>”, “<literal>United States</literal>”. | |
108 </tag-desc> | |
109 | |
110 <tag-name><var>$geoip_region</var></tag-name> | |
111 <tag-desc> | |
112 country region name (region, territory, state, province, federal land | |
113 and the like), for example, | |
114 “<literal>Moscow City</literal>”, “<literal>DC</literal>”. | |
115 </tag-desc> | |
116 | |
117 <tag-name><var>$geoip_city</var></tag-name> | |
118 <tag-desc> | |
119 city name, for example, | |
120 “<literal>Moscow</literal>”, “<literal>Washington</literal>”. | |
121 </tag-desc> | |
122 | |
123 <tag-name><var>$geoip_postal_code</var></tag-name> | |
124 <tag-desc> | |
125 postal code. | |
126 </tag-desc> | |
127 | |
128 </list> | |
129 </para> | |
130 | |
131 </directive> | |
132 | |
133 </section> | |
134 | |
135 </module> |