1

The AWStats setup instructions I have seen specifiy how to set up apache so you can view the statistics for each site by going to something like:

http://www.mydomain.com/awstats

Does anyone know how I could configure it to work with another domain for the "mydomain.com" stats. For example something like:

http://www.someotherdomain.com/awstats/www.mydomain.com/

2 Answers 2

2

AWStats is normally configured to run as a cron job. There are two parts to it.

1.) Run an update of the database. This ingests the log files. 2.) Generate the output. This is the part you need to look at.

Here's an example of what I do for some of the sites on my server:

00 7 * * *      perl /usr/lib/cgi-bin/awstats.pl -config=blackbirds.tv -output -staticlinks >/var/www/manticore/stats/awstats.blackbirds.html

The /var/www/manticore folder is the home folder for the server's main domain (www.manticore-uk.com, this is live so go and have a look, the default site is actually empty and you'll get an error, but the awstats files are all there).

As you can see this is done with a simple output redirection. And, sorry, yes, this only really works this way under Linux. I haven't got an idea how to do this under Windows.

7
  • You may need to set AWSTATS_FORCE_CONFIG in your Apache config as well: awstats.sourceforge.net/docs/awstats_security.html Sep 15, 2010 at 17:08
  • Seems to work but I wonder if there is anyway to do it but keep the nice navigation? Sep 15, 2010 at 17:20
  • What are you referring to by "nice navigation"?
    – wolfgangsz
    Sep 15, 2010 at 17:27
  • @wolfgangsz: Side-bar navigation frame. Sep 15, 2010 at 17:31
  • TBH, I have never seen a side bar in those stats. Can you point me at an example?
    – wolfgangsz
    Sep 15, 2010 at 17:32
0

Out of the box, awstats is able to do this for you:

http://www.someotherdomain.com/awstats/awstats.pl?config=www.mydomain.com

This will show you the stats for www.mydomain.com

This assumes that someotherdomain.com is hosted on the same server as mydomain.com

You should be able to use this approach for any virtual host you are monitoring via awstats on the same server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .