Package: ip2location-c-library-8.7.0  

Package: ip2location-apache-8.6.0   

Install :  

Copy ip2location.lib to your Apache /bin folder

Copy mod_ip2location.so to your Apache /modules folder

Copy ip2location.exe to your Apache /bin folder

More information, including configuration details and downloads, can be found at:

https://github.com/ip2location/IP2Location-C-Library
and
https://github.com/ip2location/ip2location-apache

Sample ip2location database files for testing can be downloaded from https://www.ip2location.com/database/lite

e.g. Sample Apache configuration entries

# ------------------

LoadModule IP2Location_module modules/mod_ip2location.so

<IfModule mod_ip2location.c>
  IP2LocationEnable ON
  IP2LocationDetectProxy ON
  IP2LocationSetmode ALL
  IP2LocationDBFile "${SRVROOT}/conf/IP2LOCATION-LITE-DB11.BIN"
</IfModule>

Note the order of the configuration settings is important. The module needs to be enabled before listing the required database file.

The command line utility ip2location.exe can used to manually query the relevant database files for an entry, e.g. 

C:\Apache24\bin>ip2location.exe -d C:\Apache24\conf\IP2LOCATION-LITE-DB11.BIN --ip 8.8.8.8
"ip","country_code","country_name","region_name","city_name","isp","latitude","longitude","domain","zip_code","time_zone","net_speed","idd_code","area_code","weather_station_code","weather_station_name","mcc","mnc","mobile_brand","elevation","usage_type","address_type","category","district","as_number","as_name","as_domain","as_usage_type","as_cidr"
"8.8.8.8","US","United States of America","California","Mountain View","N/A","37.386051","-122.083847","N/A","94035","-07:00","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","0.000000","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A"

