From 769f11df6095306d687301205f0edcdc74436719 Mon Sep 17 00:00:00 2001 From: Karl Stoney Date: Thu, 15 Feb 2018 22:10:20 +0000 Subject: [PATCH] Added GeoIP Organisational data (#2099) --- images/nginx/build.sh | 2 ++ rootfs/etc/nginx/template/nginx.tmpl | 1 + 2 files changed, 3 insertions(+) diff --git a/images/nginx/build.sh b/images/nginx/build.sh index 277ee6f64..cb064f886 100755 --- a/images/nginx/build.sh +++ b/images/nginx/build.sh @@ -98,9 +98,11 @@ fi # download GeoIP databases wget -O /etc/nginx/GeoIP.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz || { echo 'Could not download GeoLiteCountry, exiting.' ; exit 1; } wget -O /etc/nginx/GeoLiteCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz || { echo 'Could not download GeoLiteCity, exiting.' ; exit 1; } +wget -O /etc/nginx/GeoIPASNum.dat.gz http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz || { echo 'Could not download GeoLiteOrg, exiting.' ; exit 1; } gunzip /etc/nginx/GeoIP.dat.gz gunzip /etc/nginx/GeoLiteCity.dat.gz +gunzip /etc/nginx/GeoIPASNum.dat.gz mkdir --verbose -p "$BUILD_PATH" cd "$BUILD_PATH" diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 58b975933..7fa74be64 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -49,6 +49,7 @@ http { {{/* this is require to calculate traffic for individual country using GeoIP in the status page */}} geoip_country /etc/nginx/GeoIP.dat; geoip_city /etc/nginx/GeoLiteCity.dat; + geoip_org /etc/nginx/GeoIPASNum.dat; geoip_proxy_recursive on; {{ if $cfg.EnableVtsStatus }}