geo module usage
Sean Allen
sean at monkeysnatchbanana.com
Mon Jun 30 21:32:40 MSD 2008
want to make sure i understand this:
geo $country {
default no;
include conf/geo.conf;
127.0.0.0/24 us;
127.0.0.1/32 ru;
10.1.0.0/16 ru;
192.168.1.0/24 uk;
}
set the variable country based on the mapping... so if the ip address
was 192.168.1.10 then $country would be 'uk'
and i could do something like:
if ( $country = 'uk' )
{
something here
}
or
if ( $country ~* ^u )
{
something for every country that starts with a u
}
correct?
am i getting all that right?
More information about the nginx
mailing list