Most documentation for AWStats guides users on configuring Apache web server. Below are some instructions for using AWStats on Lighttpd, based on Debian Wheezy. Unfortunately the Debian package for AWStats places the files in various locations.
- apt-get install awstats
- edit /etc/awstats/awstats.conf
- LogFile=”/var/log/lighttpd/access.log”
…
LogFormat=1
…
SiteDomain=”digitalfoundations.com.au”
- LogFile=”/var/log/lighttpd/access.log”
- lighty-enable-mod accesslog
- edit /etc/lighttpd/lighttpd.conf
- server.modules = (
…
“mod_cgi”
)#static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi” )
static-file.exclude-extensions = ( “.php”, “.fcgi” )url.rewrite-once = (
“^/(cgi-bin|awstats)(.*)” => “$0”,
…
)
# Aliases for AWStats
alias.url += (
“/awstatsclasses” => “/usr/share/java/awstats/”,
“/awstatscss” => “/usr/share/doc/awstats/examples/css/”,
“/awstatsicons” => “/usr/share/awstats/icon/”,
“/awstats-icon” => “/usr/share/awstats/icon/”,
“/awstats” => “/usr/lib/cgi-bin/”,
“/icon/” => “/usr/share/awstats/icon/”,
“/cgi-bin/” => “/usr/lib/cgi-bin/”
)
HTTP[“url”] =~ “/cgi-bin/” {
cgi.assign = ( “.pl” => “/usr/bin/perl” )
}
- server.modules = (
- service lighttpd restart
At this stage you should be able to access AWStats at
Home
Secure your site appropriately. You may wish to configure Lighttpd to reverse-proxy access to awstats. If necessary secure your stats with password protection.