Maxmind GeoIP City Module

Jim Ohlstein jim at ohlste.in
Sat Jul 18 19:29:02 MSD 2009


Igor Sysoev wrote:
> On Sat, Jul 18, 2009 at 12:53:30AM -0400, Jim Ohlstein wrote:
>
>   
>> Igor Sysoev wrote:
>>     
>>> On Tue, Jul 07, 2009 at 12:51:41PM +0100, Phillip Oldham wrote:
>>>
>>>  
>>>       
>>>> We're in need of a GeoIP module which works with the current development 
>>>> branch of nginx and can resolve an IP to City-level using Maxmind's 
>>>> GeoIP Database (the .dat files). We use nginx extensively but don't have 
>>>> experience in C to develop such a module in-house. Are there any module 
>>>> developers on the list who would be interested in such a project?
>>>>
>>>> We're flexible regarding the funding of development for such a module, 
>>>> and also flexible on whether the finshed module is open-sourced and 
>>>> released back to the community.
>>>>
>>>> If anyone is interested please feel free to mail me off-list with any 
>>>> thoughts/costs/etc.
>>>>    
>>>>         
>>> The module is in the attached patch.
>>>  
>>>       
>> Can you include the module with future distributions?
>>     
>
> Yes, I will add in 0.8.6. I post it to know if other variables are needed ?
>   
Thank you Igor, and thanks to those who provided the funding for 
enhancing the module. :)

I'm assuming (so correct me if I'm wrong) that $geoip_region would be a 
US state, Canadian province, German state, etc.

If so those are all that I need for my apps.
>   
>>> ./configure ---with-http_geoip_module
>>>
>>> nginx.conf:
>>>
>>> http {
>>>
>>>    geoip_country  path/to/GeoIP.dat;
>>>    geoip_city     path/to/GeoLiteCity.dat;
>>>
>>>
>>> You may use only one base or both bases.
>>>
>>> Varaibles available with geoip_country base:
>>>
>>> $geoip_country_code
>>> $geoip_country_code3
>>> $geoip_country_name
>>>
>>> Varaibles available with geoip_city base:
>>>
>>> $geoip_city_country_code
>>> $geoip_city_country_code3
>>> $geoip_city_country_name
>>> $geoip_region
>>> $geoip_city
>>> $geoip_postal_code
>>>
>>>
>>>  
>>>       
>> Jim
>>     
>
>
>   






More information about the nginx mailing list