Search code examples
ubuntuwebminawstats

Awstat Warning: Tried to load plugin "geoip" twice. Fix config file


I have an Ubuntu 14.04 server with the web-based system configuration webmin.

So awstat is install by default.

I installed manually the plug-ins geoip and GeopIPCity plug-in but it's not working and I get this warning message: Tried to load plugin "geoip" twice. Fix config file. and Tried to load plugin "geoip_city_maxmind" twice. Fix config file.

There are these two lines on /etc/awstats/awstats.conf

LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/share/GeoIP/GeoIPCity.dat"

But also in the awstat conf files of virtual hosts.

The .dat files are in the good location:

root@Ubuntu-14LTS-NY1:/etc/awstats# ll /usr/share/GeoIP/GeoIP.dat
-rw-r--r-- 1 root root 827301 Apr  7  2014 /usr/share/GeoIP/GeoIP.dat

root@Ubuntu-14LTS-NY1:/etc/awstats# ll /usr/share/GeoIP/GeoIPCity.dat
-rw-r--r-- 1 root root 19756029 Apr 16 04:18 /usr/share/GeoIP/GeoIPCity.dat

I don't where to check to fix it.

Thanks for your help.


Solution

  • Twice, why twice !

    So I took a look at the config files. And there is a main config file and virtual hosts config files.

        root@Ubuntu-14LTS-NY1:~# ll /etc/awstats/awstats.*
        -rw-r--r-- 1 root root 62092 Apr  1 05:14 /etc/awstats/awstats.mywebsite1.org.conf
        -rw-r--r-- 1 root root 62057 Apr 21 17:59 /etc/awstats/awstats.conf
        -rw-r--r-- 1 root root   240 Nov 16  2013 /etc/awstats/awstats.conf.local
        -rw-r--r-- 1 root root 61915 Apr 21 17:14 /etc/awstats/awstats.mywebsite2.net.conf
    

    So if I modify /etc/awstats/awstats.conf to add the line LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat" I must not add it to the website config file /etc/awstats/awstats.mywebsite1.org.conf for example.

    I thought it strange reaction of config files. Loading twice !