8 Comments

  1. Hai

    I have two vcl file: magento.vcl, wordpress.vcl. How to apply two file vcl for two website wordpress and magento??

    • namhuy

      first, combine the rules in those two .vcl files into one. Then in /etc/default/varnish file, you can set the location of your own .vcl file in Alternative 2 section.

  2. [email protected]:~/git/logs# curl -I domain.local
    HTTP/1.1 200 OK
    Set-Cookie: frontend=tr7v14g1fr24dacj5ts7cmo2k1; expires=Wed, 16-Jul-2014 05:52:06 GMT; path=/; domain=domain.local; HttpOnly
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Age: 3387
    Vary: Accept-Encoding
    Content-Type: text/html; charset=UTF-8
    Date: Wed, 16 Jul 2014 03:52:06 GMT
    Age: 3387
    Connection: keep-alive

    ===================

    I not see Via: 1.1 varnish ??

  3. Hello,

    I have one comment when editing “/etc/varnish/default.vcl”: you don’t have to make a single configuration for each domain, having the “backend default” configuration (below) only is enough:

    backend default {
    .host = “127.0.0.1”;
    .port = “8080”;
    }

    Nice tutorial, thank you for sharing this.

    • namhuy

      thanks for your input, I’m sort of want to seperate things out, easy to control for each domain if thing goes wrong

Leave a Reply