Mercurial > hg > nginx-site
diff xml/en/docs/stream/ngx_stream_geoip_module.xml @ 1750:0e591e97737c
Documented the geoip module in stream.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 13 Jul 2016 21:15:55 +0300 |
parents | xml/en/docs/http/ngx_http_geoip_module.xml@07402a11fd8d |
children | 3064cb25e29d |
line wrap: on
line diff
copy from xml/en/docs/http/ngx_http_geoip_module.xml copy to xml/en/docs/stream/ngx_stream_geoip_module.xml --- a/xml/en/docs/http/ngx_http_geoip_module.xml +++ b/xml/en/docs/stream/ngx_stream_geoip_module.xml @@ -1,33 +1,32 @@ <?xml version="1.0"?> <!-- - Copyright (C) Igor Sysoev Copyright (C) Nginx, Inc. --> <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> -<module name="Module ngx_http_geoip_module" - link="/en/docs/http/ngx_http_geoip_module.html" +<module name="Module ngx_stream_geoip_module" + link="/en/docs/stream/ngx_http_geoip_module.html" lang="en" - rev="5"> + rev="1"> <section id="summary"> <para> -The <literal>ngx_http_geoip_module</literal> module (0.8.6+) creates variables +The <literal>ngx_stream_geoip_module</literal> module (1.11.3) creates variables with values depending on the client IP address, using the precompiled <link url="http://www.maxmind.com">MaxMind</link> databases. </para> <para> -When using the databases with IPv6 support (1.3.12, 1.2.7), +When using the databases with IPv6 support, IPv4 addresses are looked up as IPv4-mapped IPv6 addresses. </para> <para> This module is not built by default, it should be enabled with the -<literal>--with-http_geoip_module</literal> +<literal>--with-stream_geoip_module</literal> configuration parameter. <note> This module requires the @@ -42,13 +41,18 @@ This module requires the <para> <example> -http { +stream { geoip_country GeoIP.dat; geoip_city GeoLiteCity.dat; - geoip_proxy 192.168.100.0/24; - geoip_proxy 2001:0db8::/32; - geoip_proxy_recursive on; - ... + + map $geoip_city_continent_code $nearest_server { + default example.com; + EU eu.example.com; + NA na.example.com; + AS as.example.com; + } + ... +} </example> </para> @@ -60,7 +64,7 @@ http { <directive name="geoip_country"> <syntax><value>file</value></syntax> <default/> -<context>http</context> +<context>stream</context> <para> Specifies a database used to determine the country @@ -96,7 +100,7 @@ country name, for example, <directive name="geoip_city"> <syntax><value>file</value></syntax> <default/> -<context>http</context> +<context>stream</context> <para> Specifies a database used to determine the country, region, and city @@ -186,8 +190,7 @@ postal code. <directive name="geoip_org"> <syntax><value>file</value></syntax> <default/> -<context>http</context> -<appeared-in>1.0.3</appeared-in> +<context>stream</context> <para> Specifies a database used to determine the organization @@ -205,42 +208,6 @@ organization name, for example, “The University of Melbourne”. </directive> - -<directive name="geoip_proxy"> -<syntax><value>address</value> | <value>CIDR</value></syntax> -<default/> -<context>http</context> -<appeared-in>1.3.0</appeared-in> -<appeared-in>1.2.1</appeared-in> - -<para> -Defines trusted addresses. -When a request comes from a trusted address, -an address from the <header>X-Forwarded-For</header> request -header field will be used instead. -</para> - -</directive> - - -<directive name="geoip_proxy_recursive"> -<syntax><literal>on</literal> | <literal>off</literal></syntax> -<default>off</default> -<context>http</context> -<appeared-in>1.3.0</appeared-in> -<appeared-in>1.2.1</appeared-in> - -<para> -If recursive search is disabled then instead of the original client -address that matches one of the trusted addresses, the last -address sent in <header>X-Forwarded-For</header> will be used. -If recursive search is enabled then instead of the original client -address that matches one of the trusted addresses, the last -non-trusted address sent in <header>X-Forwarded-For</header> will be used. -</para> - -</directive> - </section> </module>