Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # load the ESI-blocks VCL
- # This should be in the same folder, or given an absolute path to the VCL.
- include "esi_blocks.vcl";
- include "drupal.vcl";
- # This is a basic VCL configuration file for varnish. See the vcl(7)
- # man page for details on VCL syntax and semantics.
- #
- # Default backend definition. Set this to point to your content
- # server.
- #
- backend default {
- .host = "127.0.0.1";
- .port = "8888";
- .probe = {
- .request = "HEAD / HTTP/1.1"
- "Host: mylocalsite.co"
- "Connection: close";
- .timeout = 5s;
- .interval = 5s;
- }
- }
- sub vcl_recv {
- call drupal_remove_cookies_recv;
- call esi_block__recv;
- }
- sub vcl_hash {
- call esi_block__hash;
- }
- sub vcl_fetch {
- call drupal_remove_cookies_fetch;
- set beresp.ttl = 10m;
- # don't ESI anything with a 3/4 letter extension
- # (e.g. don't try to ESI images, css, etc).
- if (!req.url ~ "\..{3,4}$") {
- set beresp.do_esi = true;
- }
- call esi_block__fetch;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement