Forum Moderators: phranque
We're running Apache 1.3 on Windows XP and we're using virtual hosts. Everything appears to be running fine, error log files are writing without a problem. However, the contents of my access logs only say "common" instead of generating all the appropriate referrer information. Here's some snippets from our httpd.conf (an example of a virthost listing and mod_log_config):
<IfModule mod_log_config.c>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog logs/access.log combined
<IfModule mod_deflate.c>
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate.log deflate
</IfModule>
</IfModule>
<VirtualHost *:80>
ServerName www.***.com
DocumentRoot /www/webroot/***.com
ErrorLog logs/***.com-error_log
CustomLog logs/***.com-access_log common
</VirtualHost>
Can you all give me some assistance with this? Mad props...
Essentially, CustomLog was being overridden between each of the VirtualHost tags. Now, because I want each virtual host to track different information, it was a simple matter of formatting the log between the VirtualHost tags. I commented out the old line in the VirtualHost snippet below:
It works beautifully now.
<VirtualHost *:80>
ServerName www.***.com
DocumentRoot /www/webroot/***.com
ErrorLog logs/***.com-error_log
# CustomLog logs/***.com-access_log common
LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
CustomLog logs/***.com-access_log comonvhost
</VirtualHost>