Generate Static Reports with AWStats

AWStats is a free web analytics reporting tool, suitable for analyzing data from Internet services such as web, mail and FTP servers. AWStats parses and analyzes server log files, producing html reports. Data is visually presented within reports by tables and bar graphs. To install and configure AWStats refer to the AWStats Quickstart Guide.

AWStats provides two methods to generate reports: dynamically using the awstats.pl CGI script or statically using the awstats_buildstaticpages.pl helper script. If you do not want to make your reports available to the web then you can generate static reports to view on your local machine.

To generate static HTML reports

$ cd /opt/awstats/tools/
$ awstats_buildstaticpages.pl -config=mysite -awstatsprog=/opt/awstats/wwwroot/cgi-bin/awstats.pl -month=MM -year=yyyy -builddate=yyyy-MM -dir=output_directory

-configdir Sets the path of the directory which contains the configuration files.
-awstatsprog Sets the path to the awstats.pl script.
-builddate Adds month and year info in the report’s filename.
-dir Sets the directory where the report files should be saved.

To generate PDF reports

The htmldoc package is required to be installed

$ apt-get install htmldoc

Then run the same command as generating static HTML reports with the addition of the following options:

-buildpdf Creates a PDF file, after the generation of the HTML pages is done.
-diricons Relative path to use as icon dir in links (To create a PDF file specific an absolute path)

$ awstats_buildstaticpages.pl -config=mysite -awstatsprog=/opt/awstats/wwwroot/cgi-bin/awstats.pl -month=MM -year=yyyy -builddate=yyyy-MM -buildpdf -diricons=/opt/awstats/wwwroot/icon -dir=output_directory

Related posts:

  1. AWStats Quickstart Guide
  2. Creating static IP in Xubuntu 8.10
  3. Tomcat 5.5 for Ubuntu Quickstart Guide
This entry was posted in AWStats and tagged . Bookmark the permalink.

Comments are closed.