Hi, I've changed the varnishncsa sourcecode to support virtualhost logging.
I know in the TODO of varnishncsa there is a future wish for "Log in any format one wants", but I can imagine that would need a total rewrite and takes some time. So in the meantime I have a request to add the virtualhost logging as a commandline option. I've added a -v flag enabling virtualhost style logging In this case the logformat looks like: $ varnishncsa -v www.test.nl 111.222.333.44 - - [03/Apr/2009:11:41:57 +0200] "GET http://www.test.nl/favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5)" Notice the 'www.test.nl' being logged. This is the equivalent of this kind apache logging: http://httpd.apache.org/docs/2.0/vhosts/mass.html#simple : LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon http://httpd.apache.org/docs/2.0/vhosts/mass.html#simple.rewrite : LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon So this adds the Host part to the normal kind of logging ncsa is doing. Taken that this is a very common way to log virtual hosts I would say the -v option is not just some hack to suit my own needs, I think it is usefull for others also. Without this I am not able to use awstats the way we used it when we where not using varnish. Attached you will find the diff against the current trunk. Greetings, Rob Halff
varnishncsa_virtual_host_patch.diff
Description: Binary data
_______________________________________________ varnish-dev mailing list varnish-dev@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-dev