httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Thompson <>
Subject Re: [users@httpd] Logging many, many virtualhosts to a centralized logging server
Date Sat, 11 Sep 2004 20:38:28 GMT
Bill Moran wrote to

Hi Bill,

> I tried some searches on this topic, and simply wasn't able to get any
> relevent hits.  So suggestions on searching are welcome as well as
> direct suggestions.
> We have 4 web servers, each of which has 20-40 virtual hosts on it, and
> we want to log them all to a central location so a dedicated server can
> generate stats (plus, the log files are taking up quite a bit of space).
> In order to get stats, we need each virtualhost to log to its own
> location.

I would recommend against that. Just log to one file (per server), and
use CustomLog and LogFormat to include the %v (virtual host) for every
request, and then /periodically/ run a cron job to split the output into
virtual hosts for webalizer, grouping on that %v directive.

Each server logs to its own local access.log, which you can, at regular
intervals (minutes to hours), split and copy or SCP to your master
server with webalizer. That way, apache is always logging locally, and
if your link to the master log server goes down, apache is still happy,
and the only thing that happens is the updates time out and don't get
published until the next interval.

And, to save space, you can of course rotate the access.log once the
information has been delivered to the master.

You get reliability, scalability, and efficiency, and it's pretty darned
trivial to set up.

- Ryan

> Thus, syslog isn't handling things too well, as there are
> too many different destinations to easily handle.  The fellow who
> managed this before me designed a custom logging solution, but it's
> been giving us trouble and I'm looking to see if I can come up with
> something better.
> I can't believe I'm the only one with this scenerio.  What are other
> people doing to make it happen?

   Ryan Thompson <>

   SaskNow Technologies -
   901-1st Avenue North - Saskatoon, SK - S7K 1Y4

         Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
   Toll-Free: 877-727-5669     (877-SASKNOW)     North America

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message