Howto set geoip_country for IPv4 and IPv6 databases?

Bruno Prémont bruno.premont at restena.lu
Tue Jan 15 08:08:30 UTC 2013


Hi,

It should be sufficient to just list the IPv6 database (which includes
the IPv4 database as mapped addresses) tough 1.2.x branch needs
attached patch.

I don't know if Maxim has already applied it or a variant of it to
1.3.x branch.


Also search the archives for GeoIP and IPv6 support, there were a few
posts about it.


Attached patch was initially posted in
http://mailman.nginx.org/pipermail/nginx-devel/2011-June/000971.html
(though I've updated it for 1.2.2).

Regards,
Bruno

On Tue, 15 Jan 2013 05:08:15 +0100 Patrick Lists wrote:
> Hi,
> 
> Next to their IPv4 country and city database, Maxmind now also has an 
> IPv6 country and city database at http://dev.maxmind.com/geoip/geolite
> 
> Is there a way I can make geo use the IPv6 databases too?
> 
> This does not work:
> 
> geoip_country /etc/nginx/GeoIP.dat;
> geoip_country /etc/nginx/GeoIPv6.dat;
> geoip_city /etc/nginx/GeoLiteCity.dat;
> geoip_city /etc/nginx/GeoLiteCityv6.dat;
> 
> Because I see this error when checking the config:
> 
> nginx: [emerg] "geoip_country" directive is duplicate in 
> /etc/nginx/nginx.conf:116
> 
> Thanks for any advice.
> 
> Regards,
> Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-1.2.2-geoip.patch
Type: text/x-patch
Size: 10108 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130115/442a0d69/attachment-0001.bin>


More information about the nginx mailing list