Logging and Virtual Servers
am 29.12.2007 18:24:25 von bLaura Anderson
Hello.
I need some help with logging statements for two virtual servers.
I have two virtual servers set up which work fine. They are:
/domain1.com and /domain2.com
Domain1 contains a directory which accesses a database from an old
path that I want to leave active, but I want to log that activity in
Domain2's log.
For example:
There is domain1.com and domain2.com. There is also
domain1.com/oldata
I want to put all activity from domain1.com in domain1.log and all
activity from domain1.com/olddata in domain2.log while keeping
domain2.com logging to domain2.log
What logging statements do I need to accomplish this?
Thanks.
Laura
Re: Logging and Virtual Servers
am 01.01.2008 14:30:33 von bLaura Anderson
On Sat, 29 Dec 2007 18:30:12 +0100, Davide Bianchi
wrote:
>On 2007-12-29, bLaura Anderson wrote:
>> /domain1.com and /domain2.com
>> Domain1 contains a directory which accesses a database from an old
>> path that I want to leave active, but I want to log that activity in
>> Domain2's log.
>
>You need to pipe the logs for both the virtual hosts into a some kind
>of program or script and in there do the required manipulation to
>log into one or the other file. An alternative, is simply to log all
>the activities in one big file and then post-process the entries.
>
>Davide
No, I figured out how to do it. It can be done with 2 statements:
SetEnvif Request_URI "/olddata" olddata-traffic dontlog
CustomLog logs/doman2.log combined env=olddata-traffic
These statements go into domain1.com's virtual server section. Noting
is added to domain2.com's virtual section.
The first statment says don't log /olddata traffice to domain1.com's
log
The second statement says log all /olddata traffic to domain2.com's
log.
Laura