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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |