Advertisement
Guest User

Untitled

a guest
Nov 20th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # load the ESI-blocks VCL
  2. # This should be in the same folder, or given an absolute path to the VCL.
  3. include "esi_blocks.vcl";
  4. include "drupal.vcl";
  5.  
  6. # This is a basic VCL configuration file for varnish. See the vcl(7)
  7. # man page for details on VCL syntax and semantics.
  8. #
  9. # Default backend definition. Set this to point to your content
  10. # server.
  11. #
  12. backend default {
  13. .host = "127.0.0.1";
  14. .port = "8888";
  15. .probe = {
  16. .request = "HEAD / HTTP/1.1"
  17. "Host: mylocalsite.co"
  18. "Connection: close";
  19. .timeout = 5s;
  20. .interval = 5s;
  21. }
  22. }
  23.  
  24.  
  25. sub vcl_recv {
  26. call drupal_remove_cookies_recv;
  27. call esi_block__recv;
  28. }
  29.  
  30. sub vcl_hash {
  31. call esi_block__hash;
  32. }
  33.  
  34. sub vcl_fetch {
  35.  
  36. call drupal_remove_cookies_fetch;
  37.  
  38. set beresp.ttl = 10m;
  39.  
  40. # don't ESI anything with a 3/4 letter extension
  41. # (e.g. don't try to ESI images, css, etc).
  42. if (!req.url ~ "\..{3,4}$") {
  43. set beresp.do_esi = true;
  44. }
  45.  
  46. call esi_block__fetch;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement