Wednesday, June 18, 2014

Dealing with AWSTATS.

My friend passed me an apache log file and i've attempted to parse it to AWSTATS for more "report style" human readable format...

* history > should_be_the_steps_to_follow

Wget the file / Unzip the file
wget "http://prdownloads.sourceforge.net/awstats/awstats-7.3.zip"
unzip awstats-7.3.zip

Make a directory and move awstats there.
mkdir /usr/local/awstats/
mv * /usr/local/awstats/

cd tools/
perl awstats_configure.pl
*Follow instructions to add stuff to apache/default site.

mkdir /var/lib/awstats/ ( for temp file creation i guess )

============= Jobs Done ============= 

Creating a config file for awstats.
nano /etc/awstats/awstats.demo.conf ( Replace demo with a name for easy identification )
- Change your logfile path to point to the apache access log

Execute the awstats to read your log and do it's stuff.
perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=demo -update

To build static pages ( reports ) for your users.
perl /usr/local/awstats/tools/awstats_buildstaticpages.pl -config=demo -update -dir=/some/directory/here/

No comments: