Hi all,
I had a problem with Apache's log files. I found the solution but thought would be
helpful for all the linuxers if I put it up on the list.
I have many virtual hosts on my web server. It is not ideal to log all the domains in
different log files, the reason being that Apache doesnt support more than a
limited(1024) logfiles(descriptors) opened at the same time. So I log the entries of
all the domains in a single logfile. The problem was, how do you differentiate as to
which entry comes from which domain, since my LogFormat was something like this.
LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
The %v is the virtual host but for some reason it shows the same domain for all the
entries.
I changed the LogFormat to the following.
LogFormat "%h %{HTTP_HOST}e %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
After doing much R&D :) I realised that you can specify any environmental variable in
this way. This was exactly what I wanted.
Regards
Abhijeet Tale
Trikon Electronics Pvt. Ltd.
[EMAIL PROTECTED]