Awstats stopped updating

So, if the missing dates are in June, and it is currently August, you’ll need to remove the data files for June, July, and August (they look like this where MM is the two digit month and YYYY is the four digit year) to a temporary directory so they are out of the way.First step is to get all of the logs for each domain for the month.Giving the following command line to import them all.

Before we construct that command, we’ll need to create a couple of files to use for our start and end dates.

This puts all of the domains log files for the month into a directory that we can use in the AWStats update command Things to note: You need to make sure that each of the log files you have just copied use the same format.

Now we can run the log import or update from the command line.

My Apache logs are compressed and called access.log, 1 or

This means I’ll have to do this process about 140 times. AWStats can’t run the update on older months if there are more recent months located in the data directory.

So we’ll need to move the more recent month’s stats to a temporary location out of the way.

To maintain the stats on a regular basis you will need a cron job to run the awstats update script.

Change the user who will be running the script from www-data to root.

Anyway, it was worth while as that is generally very quick and you can see some data being displayed.

Also, it is worth moving the cron file for awstats to stop that from running.

To only allow access for users configured in the auth_users file we can use the following addition at the end of /etc/apache2/sites-available/000

Tags: , ,