Hey all,

 I tried to add my wiki host to my VCL in the hopes of giving it a little
speed boost.

 However it seems that when I put the vcl into place and cycling varnish
that the 'wiki' back end is never selected. My main website gets pulled up
in the browser when I enter in the wiki URL.

Can someone maybe take a look and let me know what I'm doing wrong in my
VCL logic?

probe index {

  .url = "/index.php";

  .timeout = 5s;

  .interval = 2s;

  .window = 5;

  .threshold = 3;

}


backend web1  {

  .host = "10.10.10.5";

  .port = "80";

  .probe = index;

  .connect_timeout = 30s;

  .first_byte_timeout = 30s;

  .between_bytes_timeout = 30s;

  .max_connections = 70;

}


backend ops  {

  .host = "10.10.10.6";

  .port = "80";

  .probe = index;

  .connect_timeout = 30s;

  .first_byte_timeout = 30s;

  .between_bytes_timeout = 30s;

  .max_connections = 70;

}



director www client {

  { .backend = web1 ; .weight = 2;  }

 }



director wiki client {

  { .backend = ops; .weight = 2; }

}


sub vcl_recv {



    if ( req.url ~ "wiki.mydomain.com") {

        set req.backend = www;

    } else {

     set req.backend =  wiki;

    }



      return(lookup);


}


    sub vcl_deliver {

     if (obj.hits> 0) {

      set resp.http.X-Cache = "HIT";

     } else {

        set resp.http.X-Cache = "MISS";

     }

 }


Thanks!

Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to