Howto set geoip_country for IPv4 and IPv6 databases?
Ruslan Ermilov
ru at nginx.com
Tue Apr 30 12:34:08 UTC 2013
On Tue, Apr 30, 2013 at 06:14:54AM -0400, Rancor wrote:
> Hi,
>
> i'm trying to get this to work with the current NginX package 1.4.0 from
> dotdeb.org (using --with-ipv6) on a debian squeeze system. When downloading
> the GeoIP ipv6 binary from:
>
> http://dev.maxmind.com/geoip/geolite
>
> and changing:
>
> geoip_country /etc/nginx/GeoIP.dat;
>
> to:
>
> geoip_country /etc/nginx/GeoIPv6.dat;
>
> in my nginx.conf i'm getting this message after reload:
>
> nginx: [emerg] invalid GeoIP database "/etc/nginx/GeoIPv6.dat" type:12 in
> /etc/nginx/nginx.conf:47
>
> Any hints what's wrong here? Thanks in advance for a reply.
This happens if nginx is built without IPv6 support:
$ nginx -p . -c x.conf -t
nginx: [emerg] invalid GeoIP database "GeoIPv6.dat" type:12 in ./x.conf:9
nginx: configuration file ./x.conf test failed
$ sed -ne9p x.conf
geoip_country GeoIPv6.dat;
If OTOH nginx is built with proper IPv6 support:
$ nginx -p . -c x.conf -t
nginx: the configuration file ./x.conf syntax is ok
nginx: configuration file ./x.conf test is successful
Make sure your nginx is built with IPv6 support.
More information about the nginx
mailing list