varnishncsa - added VirtualHost support
luigi.lauro at gmail.com
Thu Feb 18 20:29:28 CET 2010
Hi everyone, first of all, a big *THANK YOU*, varnish is pure awesomeness.
The only thing I missed, is having varnishncsa log in the 'unofficial
standard' of modified NCSA, with virtualhost name included as second
Even lighttpd and other webserver default to that logging format, and
so it's very useful for interoperability (awstats, etc...) to have
varnish log in the very same way.
So i just easily added a "-v" option to varnishncsa.c bin to change
the second field from a static '-' to the correct vhost name,
normalizing the URL as well for consistency reason.
My work is based on rhalff original patch, I just modified it a bit
since rhalff version added the vhost field in FRONT of log line.
I wanted it to be 100% compatible witih lighttpd logging format, so I
altered it to my needs.
You can find both versions at: http://varnish-cache.org/ticket/485
Would be wonderful to see it in upcoming varnish release, so I won't
have to manually patch varnish port every time (i'm on a freebsd 8
NOTE: i've checked the trunk to be sure i was not doing something
obvious and already in trunk on SVN, but seems not.
Keep up the wonderful work ;-)
More information about the varnish-dev