Configuration help

James Quacinella james at nyi.net
Mon Jul 30 21:43:17 CEST 2007


Stig Sandbeck Mathisen wrote:
> "Steven Ciaburri" <steven at x92.net> writes:
>   
> See the zope-plone.vcl config which is included, and also available at
> http://varnish.projects.linpro.no/svn/trunk/varnish-cache/etc/zope-plone.vcl

Quick question about that config file:

# We only care about the "__ac.*" cookies, used for authentication
    if (req.http.Cookie && req.http.Cookie ~ 
"__ac(|_(name|password|persistent))=") {
        pass;
    }

Basically, that means if a request comes in with one of those Cookie 
values, its passed to the backend (since if a cookie is given, its 
assumed to be a dynamic page). Would it be possible to do something 
similar but to still cache static images but pass html. I was thinking 
something like req.url ~ "*.html" but not all html pages end with .html. 
Would it be better to use if (req.url ~ "*.(jpg|jpeg|gif)") { lookup } 
or something along those lines.

Anyone every try anything similar?

-- james



More information about the varnish-misc mailing list