How to configure Varnish to cache static files

This Varnish CacheĀ configuration caches all static or semi-static (e.g. compressed scripts) files – images, javascript, css. It’s ment for single machine setup, to reduce webserver load. Webserver itself in my configuration runs on port 8080. On my server load average dropped by half in peak hours thanks to Varnish. This particular server vas doing some on-the-fly css generation, so your results may vary. Continue reading