Add to Favourites Add to Favourites    Print this Article Print this Article

I would like to have Country stats in awstats

Although there are more complex/recommended ways of enabling country stats in awstats (the geoip plugin), a very quick and easy way to enable basic country stats in awstats is to edit:


and set:


Note that this will likely slow down the computation of stats significantly, since many reverse IP lookups would need to be done.

A better method for doing the Country stats is to use the GeoIP plugin.
A very rough guide would be as follows (beyond our support):


tar xvzf GeoIP.tar.gz
cd GeoIP*
make install


cpan -i Geo::IP

3) And the edit the domain's awstats conf file:


and set:

LoadPlugin="geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat"

You can leave the other setting as DNSLookups=0

If you'd like to have default values for your new domains, the template can be found here:


on the first run of AwStats, this will will be copied over.  This template is not used for existing domains, only new domains.

Was this answer helpful?

Also Read