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

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

 



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.

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



[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