Forum Moderators: phranque

Message Too Old, No Replies

Newb using Apache 1.3 - Access Log "Common Common Common"

Having problems with Apache access log

         

graphikslave

3:10 pm on Feb 22, 2005 (gmt 0)

10+ Year Member



Bear with me, here's what's up:

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...

graphikslave

4:27 pm on Feb 22, 2005 (gmt 0)

10+ Year Member



Nevermind. The solution was obvious, I'm just an Apache newb.

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>