﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
295	if geoip_org bug in regxp	Alex Storn		"'''http section'''

{{{
    # GeoIP
    # geoip_country   /usr/local/share/GeoIP/GeoIP.dat;        # the country IP database
    # geoip_city      /usr/local/share/GeoIP/GeoLiteCity.dat;  # the city IP database
     geoip_org       /usr/local/share/GeoIP/GeoIPASNum.dat;   # the ASN IP database
}}}


'''server host section'''
{{{
        location ~ \.php$ {
           .......
           if ($geoip_org ~* ^/(AS[0-9]+)/) {
               set $as_num $1;
           }
           fastcgi_param GeoIP_ASN $as_num;
       }
}}}


{{{
# cat /usr/local/bin/geoipupdate.sh
#!/bin/sh
fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz | gunzip > /usr/local/share/GeoIP/GeoIP.dat
fetch -o - http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz | gunzip > /usr/local/share/GeoIP/GeoIPASNum.dat
fetch -o - http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | gunzip > /usr/local/share/GeoIP/GeoLiteCity.dat
}}}

HTTP return ""GeoIP_ASN"" empty string
geoip_org not work in if contruction regexp
http://www.maxmind.com/en/asnum"	defect	closed	minor		nginx-module	1.3.x	invalid	geoip, geoip_org		FreeBSD 10.0-CURRENT amd64	"nginx version: nginx/1.3.12
TLS SNI support enabled
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-file-aio --with-ipv6 --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx-access.log --add-module=/usr/ports/www/nginx-devel/work/agentzh-headers-more-nginx-module-6586984 --with-http_geoip_module --with-http_stub_status_module --add-module=/usr/ports/www/nginx-devel/work/naxsi-0.46-1/naxsi_src --with-pcre --with-http_ssl_module"
