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

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

 



* on the Wed, Aug 02, 2006 at 08:42:32AM +0200, Boyle Owen wrote:

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

The way I would tackle this is:

1.) Update the LogFormat to include %{Host}i as described above
2.) Log to a pipe instead of to a file
3.) Write a script that the log will be piped to which handles
    the logic of choosing a path depending on the host, and
    writes to the correct log file.

If you take this approach, be sure to secure it so a user can't for
example symlink a log file to a system file such as /etc/passwd causing
you to overwrite/corrupt it.

I'm available for contract work if this is out of your reach. There is
also http://jobs.perl.org/ which I have no affiliation to.

Mike

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