httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: [users@httpd] Referer logs and virtual Hosts
Date Wed, 06 Aug 2003 11:22:57 GMT
Albert E. Whale, CISSP wrote:
> <VirtualHost>
> ServerName
> CustomLog logs/access_log combined
> DocumentRoot /home/JunkMail/html
> TransferLog /home/JunkMail/logs/access_log
> ErrorLog /home/JunkMail/logs/error_log
> ServerAdmin
> Options -Indexes FollowSymLinks MultiViews ExecCGI
> </VirtualHost>
> What additional information is required to collect the referrer and
> agent information into the TransferLog?

You can specify a LogFormat before the TransferLog directive:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
TransferLog /home/JunkMail/logs/access_log

Or, I'd suggest you use CustomLog instead of TransferLog:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
CustomLog /home/JunkMail/logs/access_log combined

If you're really interested in the referer, you can dedicate a log for it:
LogFormat "%{Referer}i -> %U" referer
CustomLog /home/JunkMail/logs/referer_log referer

Robert Andersson

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message