Re: custom log files and directories?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, February 22, 2007 2:13 AM [GMT+1=CET],
William Kronert <wkronert2@xxxxxxx> wrote:

> Hello,
>
> I want to direct the access logs from one directory to a custom log
> file.  Is this possible?  Example would be:
>
> www.example.com/dirA
> www.example.com/dirB
>
> I wish to have all the files that are accessed for
> www.example.com/dirB put into a special access log file named:
> dirB-access_log and all the other access logs for all the other
> directories (minus dirB) put into the standard access_log (common)
> file.
>
> Is there away to do this?  I think it is possible using the custom
> log directive but I haven’t been able to get it to work.

You could try to place CustomLog directives within <Directory> con-
tainers, but I'm not sure if that will do (report here, if you've checked
it out).

Another method is proposed (similarly) in the Apache docs
(see /manual/mod/mod_log_config.html#customlog).

Tag your requests and write to different log files like so:

SetEnvIf Request_URI ^/dirA.* dirA_req
SetEnvIf Request_URI ^/dirB.* dirB_req
SetEnvIf Request_URI ^/(?!dir[AB]).* other_req
CustomLog dirA-access.log common env=dirA_req
CustomLog dirB-access.log common env=dirB_req
CustomLog access.log env=other_req

HTH

Olaf Lautenschlaeger
ANOVA Multimedia Studios GmbH


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux