Mailing List Archive

Configuration help
I need a little help building a configuration file that will cache a site
with a simple cookie enabled. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20070729/7c2c6053/attachment.htm
Configuration help [ In reply to ]
"Steven Ciaburri" <steven at x92.net> writes:

> I need a little help building a configuration file that will cache a
> site with a simple cookie enabled.

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

--
Stig Sandbeck Mathisen, Linpro
Configuration help [ In reply to ]
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