Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 22nd October 2010, 22:54
linus3x linus3x is offline
Junior Member
Join Date: Oct 2010
Posts: 16
Thanks: 2
Thanked 4 Times in 3 Posts
Default HOWTO: Run AWStats from the Command Line

We recently needed to run a midday report of AWStats and I wanted to share what we learned. Because ISPConfig 3 runs one report at 12:30 AM, I decided to kick off a midday run of AWStats from the command line.

These instructions are for Debian Lenny.

Note: If you ever want to run ISPConfig's entire nightly cron job from the command line (which includes the AWStats reports), you can use:

The instructions that follow assume that you only want to update AWStats for a single website.

First of all, I’m assuming you’ve got ISPConfig 3 installed correctly and that all of the AWStats paths are set to the defaults on the System > Server Config > Web tab. In addition, I’ll assume that when you set up your Website > Web Domain > Statistics tab, you entered in a password and you selected AWStats as your Webstatistics program.

If so, then you can imitate what ISPConfig 3 does when it does its run. First go to this directory:

cd /etc/awstats/
Run ls and look for a file with your domain name in it. It’ll be something like:

That’s your site’s config file. You’ll need to know whatever is between awstats and conf when you do the update. Here’s it just yourdomain.com but if the file were named something like:

You’d need:

Make sense?

Ok, next you’re going to need to know where to place the output files. If you’ve gone with the defaults, this is probably going to be something like this:

Where client1 and web1 are whatever is displayed on the Website > Web Domain > Options tab. (If you’ve made any adjustments to the System > Server Config > Web tab > Website path you’ll need to adjust your output path accordingly.)

You’re ready to run the command, substituting in your information:

/usr/share/awstats/tools/awstats_buildstaticpages.pl -config=yourdomain.com -update -awstatsprog=/usr/lib/cgi-bin/awstats.pl -dir=/var/www/clients/client1/web1/web/stats
So breaking it down:

-config=whatever was the “xxx” in your awstats.xxx.conf file name
-update run an update to pick up the latest stats
-awstatsprog=path to awstats.pl on your system
-dir=your output file directory
Once you’re done, you can access your stats using something similar to the following:

You’ll be asked for your name and password – this is admin plus whatever you set up on the Website > Web Domain > Statistics tab.

Last edited by linus3x; 22nd October 2010 at 23:39. Reason: Added cron job information
Reply With Quote
The Following User Says Thank You to linus3x For This Useful Post:
erotism (21st June 2014)
Sponsored Links
Old 22nd October 2010, 23:54
linus3x linus3x is offline
Junior Member
Join Date: Oct 2010
Posts: 16
Thanks: 2
Thanked 4 Times in 3 Posts
Default One More Thing...

By the way, I should add to this that the nightly cron job takes the added step of renaming the awstats.yourdomain.com.html file to index.html so that you can access the stats using:

So if wanted to completely mimic the nightly cron job, you'd run something like:

mv /var/www/clients/client1/web1/web/stats/awstats.yourdomain.com.html /var/www/clients/client1/web1/web/stats/index.html
Reply With Quote
The Following 2 Users Say Thank You to linus3x For This Useful Post:
erotism (21st June 2014), falko (23rd October 2010)


awstats, debian lenny, ispconfig 3

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Awstats - howto? Olgierd General 4 8th November 2010 13:23
Companion Script #2 for The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" MrCompTech Tips/Tricks/Mods 0 10th July 2010 06:11
Need help setting up or accessing AWStats on 3.0.2 please jwlinux Installation/Configuration 2 17th April 2010 17:38
Ispconfig + awstats on debian etch Dennis Installation/Configuration 1 19th April 2008 23:57
Suse Ispconfig and AWstats shajazzi Installation/Configuration 4 16th May 2006 00:04

All times are GMT +2. The time now is 11:53.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.