RE: [users@httpd] Using env vars to compliment logging

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

 



> -----Original Message-----
> From: jslive@xxxxxxxxx [mailto:jslive@xxxxxxxxx] On Behalf Of 
> Joshua Slive
> Sent: Wednesday, August 02, 2006 1:31 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re: [users@httpd] Using env vars to compliment logging
> 
> On 8/1/06, Dan Trainor <dan@xxxxxxxxx> wrote:
> > Hello, all -
> >
> > For sake of trying to sound clever, I'll just flat-out say what I'm
> > looking for, instead of using a real example.
> >
> > We use a wildcard approach in a VirtualHost container to accept
> > requests, and it works quite well.  However, I am having 
> trouble making
> > logs for each actual server name which I'm serving.
> >
> > Ideally I'd like something such as:
> >
> > Customlog /path/to/logs/$HTTP_HOST-access.log combined
> >
> > to create /path/to/logs/domain.tld-access.log.
> >
> > Do I have this flexibility, or would I have to consider 
> alternate routes?
> 
> No, you can't use env variables in CustomLog definitions.  
> The docs are here:
> http://httpd.apache.org/docs/2.2/logs.html#accesslog
> 
> You have two choices:
> 
> 1. Put everything into one logfile and split it later using something
> like the split-logfile program included with apache.
> 
> 2. Put a separate CustomLog directive in each <VirtualHost> section.

If I understood the OP correctly, he wants ever more fine-grained
control than that - he wants separate logs for different ServerAliases
*within* a VH... ("wildcard approach in a VirtualHost container").

That can't be done and you'd have to define a separate VH for each alias
(ie, expand the aliases into full VHs). As described in (1) above, the
better approach is to parse a global logfile later - you can put the
hostname into the LogFoprmat with %{Host}i.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 


> 
> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
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