Running awstats on a single logfile

Posted . Visible to the public.

AWstats is build to regularly run on webservers. If you want it to build a report once, here is the minimal configuration you need:

Put the following into the awstats config file (look into /etc/awstats/awstats.conf.local or look into /etc/awstats/awstats.conf how to do it on your system):

SiteDomain="yourdomain.de"
DirData="."
DNSLookup=0

Run the following to build a simple HTML page:

awstats -staticlinks -config="yourdomain.de"  -LogFile=your-logfile.log -output > report.html

This might take a second (it will take ages if you do not turn off DNS lookups). Images might be broken, you might need to copy them from the awstats WWW directory if you need them.

Thomas Eisenbarth
Last edit
Thomas Eisenbarth
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2016-10-04 13:03)