httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] custom log files and directories?
Date Thu, 22 Feb 2007 01:16:56 GMT
On 2/21/07, William Kronert <wkronert2@cox.net> 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.

This isn't really advisable.  But it can be done using something like
SetEnvIf Request_URI ^/dirA dira=1
CustomLog logs/dira.log common env=dira
CustomLog logs/other.log common env=!dira

See:
http://httpd.apache.org/docs/2.2/logs.html#conditional

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message