Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Howto set geoip_country for IPv4 and IPv6 databases?

$
0
0
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.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>