Using log files of other web servers with awstats

From Notes_Wiki
Revision as of 10:33, 23 June 2013 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>Awstats_configuration|Awstats configuration</yambe:breadcrumb> ==Using log files of other web server with awstats== One can copy log files of other web serve...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>Awstats_configuration|Awstats configuration</yambe:breadcrumb>

Using log files of other web server with awstats

One can copy log files of other web server where logs are in combined format and analyse them with awstats. For analysis one can run awstats.pl as

perl awstats.pl -config=<site-name> -update 

but this is not enough to show logs when one visits /awstats/awstats.pl?config=<site-name>

One needs to run

/usr/bin/awstats_updateall.pl now         -confdir="/etc" -awstatsprog="/var/www/awstats/awstats.pl" >/dev/null

as mentioned in /etc/cron.hourly/00awstats file. But the cron file assumes the location of log file to be /var/log/httpd/access.log which may not be correct if log files have been copied from other server to other location. Hence first this assumption should be satisfied or the check for the file should be commented. Or one can run the command directly to ensure that logs get processed.