Penguin
Note: You are viewing an old revision of this page. View the current version.

Debian/Ubuntu AWStats virtual host setup

Install awstats with apt-get install awstats. To get geostats working, so you can tell the countries of origin of your visitors, apt-get install libnet-ip-perl libgeo-ipfree-perl.

Configuring Apache

Drop this in /etc/apache2/awstats.conf:

Alias /awstats-icon/ /usr/share/awstats/icon/

<Directory /usr/share/awstats/icon>
  Options None
  AllowOverride None
  Order allow,deny
  Allow from all
</Directory>

Then, add Include /etc/apache2/awstats.conf to /etc/apache2/apache2.conf.

Configuring AWStats

For each vhost you want to analyse, create a /etc/awstats/awstats.vhost.domain.co.nz.conf file, looking like such:

LogFile="/var/www/vhost.domain.co.nz/log/access.log"
LogType=W
LogFormat=4
LogSeparator=" "
SiteDomain="vhost.domain.co.nz"
HostAliases="localhost 127.0.0.1"
DNSLookup=1
DirData="/var/lib/awstats"
DirCgi="/cgi-bin"
DirIcons="/awstats-icon"
AllowToUpdateStatsFromBrowser=0
AllowFullYearView=2

To be continued after scones!


CategoryNotes