I have this working pretty well (ok, I think _very_well_ ) with GeoIP.
I used a MAP in the main nginx.conf like this:
map $geoip_country_code $allowed_country {
default 0;
US 1;
GB 1;
CA 1;
EU 1;
}
Then, in my default.conf, the first statement(s) in the relevant
"location's" is:
if ($allowed_country = 0) {
return 418;
}
Again, this works for me, and you can add "allowed countries" in just
one place: the "map".
-AJ
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx