|
|
 |
|
|
Pages: 1
Apache: Directory-specific logging
(Click here to view the original thread with full colors/images)
Posted by: uh...ok
Is it possible to setup directory-specific access logging in Apache (I'm running the Win32 version) without setting up a VirtualHost? If not, is it possible to setup a fake VirtualHost that's not really a host?
To be more clear, here's what I'm trying to do...
I have a particular folder on my server that gets a lot of traffic, and I want to separate the traffic reporting for that one folder from the rest of my server...
e.g. http://myweb.mit.edu/visitme/ is the particular folder,
I want a log for that folder only, and a log for the rest of my server that excludes that folder.
I wouldn't want to have to setup VirtualHost and force the URL to be http://myweb.visitme.mit.edu - I'd rather just keep it in the above form.
Any ideas about whether I can do this or not?
Thanks.
Posted by: uh...ok
I RTFM'd, and for those wondering, here's a solution:
SetEnvIf Request_URI \ !dontlog2
SetEnvIf Request_URI visitme\ dontlog1 dontlog2
CustomLog logs/access.1log common env=!dontlog1
CustomLog logs/access2.log common env=dontlog2
This creates two Logfiles - one that logs everything but the visitme folder, and one that logs only the visitme folder.
|
|
|
|
|