httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: [users@httpd] Referer logs and virtual Hosts
Date Wed, 06 Aug 2003 11:22:57 GMT
Albert E. Whale, CISSP wrote:
> <VirtualHost  66.93.61.117>
> ServerName www.No-JunkMail.com
> CustomLog logs/access_log combined
> DocumentRoot /home/JunkMail/html
> TransferLog /home/JunkMail/logs/access_log
> ErrorLog /home/JunkMail/logs/error_log
> ServerAdmin webmaster@No-JunkMail.com
> 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
(see http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#logformat)
(see http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#transferlog)

Or, I'd suggest you use CustomLog instead of TransferLog:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
CustomLog /home/JunkMail/logs/access_log combined
(see http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog)

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

Regards,
Robert Andersson


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message