default.vcl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # This is an example VCL file for Varnish.
  3. #
  4. # It does not do anything by default, delegating control to the
  5. # builtin VCL. The builtin VCL is called when there is no explicit
  6. # return statement.
  7. #
  8. # See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
  9. # and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples.
  10. # Marker to tell the VCL compiler that this VCL has been adapted to the
  11. # new 4.0 format.
  12. vcl 4.0;
  13. # Default backend definition. Set this to point to your content server.
  14. backend default {
  15. .host = "127.0.0.1";
  16. .port = "8080";
  17. }
  18. sub vcl_recv {
  19. # Happens before we check if we have this in cache already.
  20. #
  21. # Typically you clean up the request here, removing cookies you don't need,
  22. # rewriting the request, etc.
  23. }
  24. sub vcl_backend_response {
  25. # Happens after we have read the response headers from the backend.
  26. #
  27. # Here you clean the response headers, removing silly Set-Cookie headers
  28. # and other mistakes your backend does.
  29. }
  30. sub vcl_deliver {
  31. # Happens when we have all the pieces we need, and are about to send the
  32. # response to the client.
  33. #
  34. # You can do accounting or modifying the final object here.
  35. }