Varnish 2 VCL
How do i get varnish to cache all images? I had varnish 1 working with this but it seems my vcl does not work at all with 2 Here is my VCL # # This is a basic VCL configuration file for varnish. See the vcl(7) # man page for details on VCL syntax and semantics. # # $Id: default.vcl 1818 2007-08-09 12:12:12Z des $ # # Default backend definition. Set this to point to your content # server. backend default { .host = 127.0.0.1; .port = 80; } acl purge { localhost; } sub vcl_recv { if (req.request == PURGE) { if (!client.ip ~ purge) { error 405 Not allowed.; } lookup; } if (req.request != GET req.request != HEAD) { pipe; } if (req.http.Expect) { pipe; } /* Always cache images and binaries */ if (req.url ~ \.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tgz|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$) { lookup; } /* Always cache CSS and javascript */ if (req.url ~ \.(css|js)$) { lookup; } lookup; } /* Deal with purge requests */ sub vcl_hit { if (req.request == PURGE) { set obj.ttl = 0s; error 200 Purged; } deliver; } sub vcl_miss { if (req.http.If-Modified-Since) { pass; } if (req.request == PURGE) { error 404 Not in cache; } fetch; } sub vcl_fetch { if (!obj.valid) { error; } if (!obj.cacheable) { pass; } if (obj.http.Set-Cookie) { pass; } if(obj.http.Set-Cookie){ pass; } if(obj.http.Pragma ~ no-cache || obj.http.Cache-Control ~ no-cache || obj.http.Cache-Control ~ private){ pass; } if (req.url ~ (errorPage?)) { set obj.ttl = 0s; } if (req.url ~ (exceptionPage?)) { set obj.ttl = 0s; } if (req.url ~ (unauthorizedPage?)) { set obj.ttl = 0s; } if (req.url ~ (type=The+requested+Virtual+Kiosk+is+currently+not+available+from+%5Benter+Virtual+Kiosk+Sponsor+Name+here%5D.+Please+close+the+Virtual+Kiosk+and+try+again.)) { set obj.ttl = 0s; } insert; } sub vcl_deliver { remove resp.http.X-Varnish; remove resp.http.Via; }___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Guru Meditation error
Mhairi Marshall skrev: I have been getting the Guru Meditation when using varnish (version 1.1.2) cache for Plone sites. I have seen from the mailing list that some people have been having the same problem but haven’t seen any solutions posted. Is there any configuration for varnish or apache that will stop this error from happening? Its hard to say without any more information. Anyway, you should really upgrade to Varnish 2.0.1 (or 2.0.2 if its out). Varnish 2 is much more robust. This might be because Plone sometimes misbehavies - but try an upgrade and get back to us if you're still having trouble. -- Per Buer - Leder Infrastruktur og Drift - Redpill Linpro Telefon: 21 54 41 21 - Mobil: 958 39 117 http://linpro.no/ | http://redpill.se/ signature.asc Description: OpenPGP digital signature ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc