the most basic config

DHF varnish-list at
Tue Apr 1 17:42:17 CEST 2008

Sascha Ottolski wrote:
> Hi,
> I'm a bit puzzled by the examples and the explanation of the "default" 
> vcl config presented in the man page. Now I'm wondering, if I want to 
> make my first steps for creating a reverse proxy for static images 
> only, that basically should cache everything indefinetely (as long as 
> cache space is available), what would be the minimum config I need to 
> have? Of course I need to define a backend, may be increase the TTL for 
> objects.
> A pointer to some kind of "beginners guide" would be nice, if such a 
> thing exists.
I don't think there really is a step by step beginners guide to varnish, 
though one nice thing is out of the box it works with very few changes.  
If you used the rpm that is available on sourceforge, all you need is 
the following in /etc/sysconfig/varnish:

DAEMON_OPTS="-a :80 \
             -T localhost:82 \
             -b localhost:81 \
             -u varnish -g varnish \
             -s file,/var/lib/varnish/varnish_storage.bin,1G"

I have this on a test machine in my lab currently and it is happily 
wailing out cached bits at an unbelievable rate.  Apache is running on 
localhost:81, and it is setting the desired age for objects, the storage 
file size above is the default.  This should get you up and running, and 
you can start tuning from there.  One thing that seems to be daunting at 
first is that varnish is extremely flexible, and because of that there 
are many examples of neat configuration tricks and snippets of wizardry 
sprinkled in the sparse documentation, which makes it seem that these 
things are necessary to make varnish work, but this is not the case, the 
default settings work quite well.


More information about the varnish-misc mailing list