This plugin enables users to display the geolocation informaton, such as country, region, city, derived from the IP addresses.
Install Geo::IP2Location libraries from CPAN.
Upload ip2location.pm to
/etc/awstats/awstats.confand insert following line:
**Note: ** Make sure the path to IP2Location database file is correct.
Disable any Maxmind GeoIP plugin as AWStats hook can only access by one plugin per time.
View the information by accessing "Countries" or "Hosts" from the left menu.
It's recommended to use IP2Location DB3 which included country, region, and city information.
- IP2Location LITE (Free): https://lite.ip2location.com
- IP2Location Commercial (Comprehensive): https://www.ip2location.com
IPv4 BIN vs IPv6 BIN
Use the IPv4 BIN file if you just need to query IPv4 addresses.
Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.