Strange issue with CustomLog and multiple virtual hosts

This is a discussion on Strange issue with CustomLog and multiple virtual hosts within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi All, This is a really strange one, and probably due to something that I've overlooked. I'm also ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-30-2003
Paul Perkins
 
Posts: n/a
Default Strange issue with CustomLog and multiple virtual hosts

Hi All,

This is a really strange one, and probably due to something that I've
overlooked. I'm also sure that I've seen the following working properly!

My aim is to have a mass virtual-hosted machine with 99.9% of domains
running with the same configuration, but for a specific, named virtual
host, I want to configure the logging so that it has a different log
format and is written to a different place.

The server is 1.3.28 on Solaris 8.

So, my (condensed) httpd.conf looks like this:

# Main (default) section
LogFormat "%h %l %u %t \"%r\" %s %b %V" vcommon
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
%V" full_combined

# Interesting line
CustomLog /usr/local/apache/logs/access_log vcommon

<virtualhost _default_:80>
VirtualDocumentRoot /export/home/%0/www

CustomLog /usr/local/apache/logs/access_log vcommon
</virtualhost>

<virtualHost www.special-domain.com:80>
VirtualDocumentRoot /export/home/%0/www

# Troublesome line.
CustomLog /export/home/special-domain.com/logs/access_log full_combined
</VirtualHost>

What seems to happen is that when 'troublesome line' is uncommented,
*all* logging seems to go to the second logfile, not just hits for
special-domain.com. When the line is commented out, all logging goes to
the 'default' location. Also, if I comment out 'interesting line', then
I get no logging at all!

Changing the ordering of the <virtualhost> sections seems to make no
difference.

What am I missing? I'd be happy to post the full conf file if that would
help.

Many thanks in advance,

Paul.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0