Varnish.rst 647 B

12345678910111213141516171819202122
  1. Usage with Varnish
  2. =============
  3. Serving a big zip with varnish in between can cause random stream close.
  4. This can be solved by adding attached code to the vcl file.
  5. To avoid the problem, add the following to your varnish config file:
  6. .. code-block::
  7. sub vcl_recv {
  8. # Varnish can’t intercept the discussion anymore
  9. # helps for streaming big zips
  10. if (req.url ~ "\.(tar|gz|zip|7z|exe)$") {
  11. return (pipe);
  12. }
  13. }
  14. # Varnish can’t intercept the discussion anymore
  15. # helps for streaming big zips
  16. sub vcl_pipe {
  17. set bereq.http.connection = "close";
  18. return (pipe);
  19. }