Logs With Virtual Host Information
Prev | Chapter 16. WWW Supported Log Format | Next

## Logs With Virtual Host Information

You may encounter log files that have a field containing the virtual host for which the requests was at the beginning of the line. The rest of the line is usually in the common or combined log format. This kind of logging is typically seen on webservers hosting several virtual servers.

Example of such a line:

    www.example.com 1.7.2.21 - - [13/Oct/2000:10:30:16 +0200] \
      "GET / HTTP/1.0" 200 83

Although Lire doesn't directly support such logs, it is easy to split those logs into many log files in the common or combined log format which can subsequently be processed by Lire.

Example doing this in a shell:

    $  mkdir apache-common.log
    $  (while read virt rest; do echo $rest >> \
    apache-common.log/$virt; done) < /var/log/apache/common.log
    $  for f in apache-common.log/*; do \
    lr_log2mail -s "$f" common joe@example.com < $f; done

Prev | Up | Next
Referer Log Format | Home | W3C Extended Log Format