multiple access log in one server

1.3k Views Asked by At

I have setup awstats in server , in this server , there is only one apache access log now , I can use this access log for awstats statistics , it works .

As I have many web server also want to do the awstats statistics but do not want to install awstats program in each of these server , therefore I want to copy all apache access log from another server to awstats server , then run the program for each of all access log.

would advise is it possible , would advise how can I do it ? very thanks .

2

There are 2 best solutions below

0
On

I've done this before, you can follow below step:

  • Copy all log file into awstats server (manual or any protocol)
  • With each individual site, create a individual config file (awstats.sitename.conf)
  • Modify log file path in config file point to relate log file.
  • Run update for each site.

=> Output file will be create in Output directory. Each site will use individual URL to access

ex: .....awstats/awstats.pl?config=site_name

You should create a index HTML page to manage all log analize site.

2
On

As far as I remember awstats has problems if you want to combine logs from various servers. As long as you create statistics per server I see no problem if you gather logs from many servers and provide / generate the statistics on only one. Depending on the size of the logs you should delete the originary log files as soon as possible or have them created in a central location from the beginning.

There are bigger solutions (like logstash) for this, so you might consider using a different solution which gathers the logs for you.

Some years ago I used awstats to create static html pages with a commandline like that:

perl awstats_buildstaticpages.pl -config=myconfiga -dir=C:\temp\reports -buildpdf=...  -awstatsprod=...

Just make sure you output html pages don't get overwritten (use the -dir command) and that you specify one log file by after the other (make sure the LogFile directive in your conf file points to the correct file or specify -logfile accordingly)