Virtualmin AWstats GeoIP configuration bug and solution

OS type and version Ubuntu Linux 22.04.3
Webmin version 2.102
Virtualmin version 7.7
Related packages virtualmin-awstats

On the AWStats configuration when you enable the plugins for GeoIP, the relevant lines remains commented in the AWStats configuration file for the domain, so the plugin won’t run.

My solution was to add those lines to the etc/awstas/awstats.conf.local global configuration file.

LoadPlugin=“geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat”
LoadPlugin=“geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPCity.dat”
LoadPlugin=“geoip_asn_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPASN.dat”

This was done about a year ago, but I posted it as I assume it is still relevant.

When you regenerate does it work ok?

Not when using the interface. The lines remains commented also if I regenerate the report.

It seem to work with OP suggestion, but took me a bit to make it work, but I used the free GeoLite2 databases

LoadPlugin=“geoip2_country /usr/share/GeoIP/GeoLite2-Country.mmdb”
LoadPlugin=“geoip2_city /usr/share/GeoIP/GeoLite2-City.mmdb”

Thanks for the information! I use now GeoLite2 like you. It took me a lot of time to find the required Geo2 libraries, so I add a link to a page that has installing instructions for different operating systems (mine is the “Debian/Ubuntu 20+ / Debian 10+”.

Here is also a link to an additional script to put in the plugins pages, for use with the Maxmind GeoLite2 ASN database:

I also installed the GeoIPUpdate program from MaxMind you mentioned in your other reply, according to their instructions.

Thanks again for the tips!

Thank you for the update, and you’re welcomed.
*write it down what you did to know in the future.