To setup AWStats on Debian with Apache, I followed these steps.

apt-get install awstats

I read through the examples in /usr/share/doc/awstats/examples/, and I edited /etc/awstats.conf to have SiteDomain=”*” and:

LogFormat = "%other %host %time1 %methodurl %code %bytesd %uaquot"

as I use a custom log format.

Then I ran:

/usr/lib/cgi-bin/awstats.pl -config=/etc/awstats/awstats.conf

Copied /usr/share/doc/examples/apache.conf to conf.d and we’re good to go!