Varnish and virtual hosting

Justin Finkelstein justin at redwiredesign.com
Fri Feb 13 11:07:05 CET 2009


Hi guys

I'm fairly new to Varnish and it's goodness and not that brilliant a
sysadmin (I'm a developer, really) and I have some questions about how
to go about setting up Varnish in a virtual hosting environment. 

I've had a lot of trouble combining the technologies I use for
non-proxied hosting with Varnish and what I'd like to do is start a
thread to get other people's experiences then combined all this into a
bit of documentation for the wiki.

So first, when I host a website in Apache, I use it's log piping
capability to parse the output of its access logs for each virtual host
through Cronolog, so that we can have one log file per day, organised in
folders of hostname/year/month. We then chuck all this data at awstats
to generate traffic logs based on this data.

When I was trying to set this up to work with varnish, I ran into a
couple of problems:

    1. There didn't seem to be a way to seperate out log data for each
virtual host using varnishncsa.

    2. There doesn't seem to be a way to get log data out of varnish in
a 'live' fashion or in a historical way; meaning (from my view) that if
the server crashes of varnish fails, I have to do some work to get the
log data out.

    3. There doesn't seem to be a way to process live varnishncsa data
via a pipe. If this were possible, then I think I would find this whole
process a lot easier. Instead, it seems there are two options: to
historically dump log data via an option, or run as a daemon and send
output to a file (which cannot be via a pipe).

I've read the respective man pages for all of the various applications
several times and couldn't find a clear solution, so if anyone on this
list has been through something similar, or has any ideas on the
subject, please contribute them and I'll write the whole thing up as a
kind of how-to.

Thanks,

Justin

-- 
Redwire Design Limited

54 Maltings Place
169 Tower Bridge Road
London SE1 3LJ
www.redwiredesign.com

[ 020 7403 1444 ] - voice
[ 020 7378 8711 ] - fax
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20090213/87feeece/attachment-0001.html>


More information about the varnish-misc mailing list