<div dir="ltr">Hey all,<div><br></div><div> I tried to add my wiki host to my VCL in the hopes of giving it a little speed boost. </div><div><br></div><div> 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. </div><div><br></div><div>Can someone maybe take a look and let me know what I'm doing wrong in my VCL logic?</div><div><br></div><div>







<p class="">probe index {</p>
<p class="">  .url = "/index.php";</p>
<p class="">  .timeout = 5s;</p>
<p class="">  .interval = 2s;</p>
<p class="">  .window = 5;</p>
<p class="">  .threshold = 3;</p>
<p class="">}</p>
<p class=""><br></p>
<p class="">backend web1  {</p>
<p class="">  .host = "10.10.10.5";</p>
<p class="">  .port = "80";</p>
<p class="">  .probe = index;</p>
<p class="">  .connect_timeout = 30s;</p>
<p class="">  .first_byte_timeout = 30s;</p>
<p class="">  .between_bytes_timeout = 30s;</p>
<p class="">  .max_connections = 70;</p>
<p class="">}</p>
<p class=""><br></p>
<p class="">backend ops  {</p>
<p class="">  .host = "10.10.10.6";</p>
<p class="">  .port = "80";</p>
<p class="">  .probe = index;</p>
<p class="">  .connect_timeout = 30s;</p>
<p class="">  .first_byte_timeout = 30s;</p>
<p class="">  .between_bytes_timeout = 30s;</p>
<p class="">  .max_connections = 70;</p>
<p class="">}</p>
<p class=""><br></p>
<p class=""><br></p>
<p class="">director www client {</p>
<p class="">  { .backend = web1 ; .weight = 2;  }</p>
<p class=""> }</p>
<p class=""><br></p>
<p class=""><br></p>
<p class="">director wiki client {</p>
<p class="">  { .backend = ops; .weight = 2; }</p>
<p class="">}</p>
<p class=""><br></p>
<p class="">sub vcl_recv {</p>
<p class=""><br></p>
<p class=""><br></p>
<p class="">    if ( req.url ~ "<a href="http://wiki.mydomain.com">wiki.mydomain.com</a>") {</p>
<p class="">        set req.backend = www;</p>
<p class="">    } else {</p>
<p class="">     set req.backend =  wiki;</p>
<p class="">    }</p>
<p class=""><br></p>
<p class=""><br></p>
<p class="">      return(lookup);</p>
<p class=""><br></p>
<p class="">}</p>
<p class=""><br></p>
<p class="">    sub vcl_deliver {</p>
<p class="">     if (obj.hits> 0) {</p>
<p class="">      set resp.http.X-Cache = "HIT";</p>
<p class="">     } else {</p>
<p class="">        set resp.http.X-Cache = "MISS";</p>
<p class="">     }</p>
<p class=""> }</p><p class=""><br></p><p class="">Thanks!</p><p class="">Tim</p><div><div><br></div>-- <br><div class="gmail_signature">GPG me!!<br><br>gpg --keyserver <a href="http://pool.sks-keyservers.net" target="_blank">pool.sks-keyservers.net</a> --recv-keys F186197B<br><br></div>
</div></div></div>