Forum: NGINX GeoIP module questions

6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2007-09-25 22:03
(Received via mailing list)
Hey there nginxers-

  Is there a way to use a geoip database with nginx instead of
explicitely listing out all the IP ranges in the nginx.conf?
Something like this:

  There is a modeul for apache and lighttpd for this type of stuff.
Any hints or help here? Or shoudl I just script something up to auto
generate the geoip config for nginx from one of these databases?


-- Ezra Zygmuntowicz
-- Founder & Ruby Hacker
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
84253a016a6cac2cc53461d6e8085929?d=identicon&s=25 proforg (Guest)
on 2007-09-25 23:31
(Received via mailing list)
Attachment: smime.p7s (2 KB)

+ contrib/ to convert MaxMind CSV database.


geo $IP_GEO

  default  --;
         include /etc/nginx/geo_ip_country;

and proxy_set_header / fastcgi_param as usual

On 25.09.2007, at 23:52, Ezra Zygmuntowicz wrote:

> auto generate the geoip config for nginx from one of these databases?

Aleksej Besciokov
+7 495 7853149
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2007-09-25 23:32
(Received via mailing list)

On Tue, 25 Sep 2007, Ezra Zygmuntowicz wrote:

> geoip config for nginx from one of these databases?
Hint 1:
You may use contrib/ script to convert maxmind's geoip
database into nginx config format.

Hint 2:
You may use "include" directive to include additional file into
(e.g. your converted geoip database).

Maxim Dounin
50d74d0bd9bc89f3b6f79d04abb71a32?d=identicon&s=25 Joe Rugger (rugger76)
on 2008-01-25 12:28
quick, dumb follow up question on this...

what is the syntax for running

tried ./ GeoIPCountryWhois.csv geo.conf


./ GeoIPCountryWhois.csv > geo.conf

to no avail.

the script looks quite simple, and i tried to RTFM i.e look at the
script, but there's no usage example, and it doesn't look like there's
any switches.

i tried hunting around for some similar examples, no luck.

im sure this is really simple, considering there isn't even a usage
example, but im not very bright.. i mean not a coder or perl guy...
could somebody help a brother  out on this one

thanks in advance
Ee2c856f838c369d00a1bb4886d68898?d=identicon&s=25 Igor Clark (Guest)
on 2008-01-25 12:49
(Received via mailing list)
perl < GeoIPCountryWhois.csv > geo.conf
50d74d0bd9bc89f3b6f79d04abb71a32?d=identicon&s=25 Joe Rugger (rugger76)
on 2008-01-25 15:04
awesome, thanks!
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.