Skip to content

Commit

Permalink
example varnish esi config
Browse files Browse the repository at this point in the history
svn path=/diazo/trunk/; revision=45353
  • Loading branch information
lrowe committed Feb 11, 2010
1 parent f540df8 commit c24f097
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
14 changes: 14 additions & 0 deletions examples/varnish.vcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
backend default {
.host = "127.0.0.1";
.port = "8000";
}

sub vcl_recv {
set req.backend = default;
}

sub vcl_fetch {
if (obj.http.Content-Type == "text/html; charset=utf-8") {
esi;
}
}
12 changes: 1 addition & 11 deletions varnish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ extends = nginx.cfg
parts +=
varnish-build
varnish
varnish.vcl

[example-theme]
includemode = esi

[varnish-build]
recipe= zc.recipe.cmmi
Expand All @@ -16,10 +12,4 @@ url = ${varnish:download-url}
recipe = plone.recipe.varnish
daemon = ${buildout:parts-directory}/varnish-build/sbin/varnishd
bind = 127.0.0.1:8001
config = ${buildout:directory}/etc/varnish.vcl
cache-size = 10M

[varnish.vcl]
recipe = collective.recipe.template
input = ${buildout:directory}/templates/varnish.vcl.in
output = ${buildout:directory}/etc/varnish.vcl
config = ${buildout:directory}/examples/varnish.vcl

0 comments on commit c24f097

Please sign in to comment.