Hi folks,<div><br></div><div>Just curious if you can point me in the right direction.</div><div><br></div><div>I have 2.0.6 varnish running. So it seems as if the cache is working and i am getting cache hits.</div><div><br>
</div><div>When i shut down the back end i can still get to the cached pages.</div><div><br></div><div>On the other hand when i try a new browser i keep getting 503 pages.</div><div><br></div><div>Any ideas?</div><div><br>
</div><div><br></div><div><br></div><div><div>backend default {</div><div> .host = "10.249.129.171";</div><div> .port = "80"; }</div><div><br></div><div> sub vcl_recv {</div><div>unset req.http.cookie;</div>
<div><br></div><div> if (req.url ~ "^/admin/"){</div><div> set req.url = regsub(req.url, "^/admin/", "/oops/"); }</div><div><br></div><div> if (req.url ~ "/affiliates/visa-signature/") {</div>
<div> return(pass); }</div><div><br></div><div>if (req.http.cookie) {</div><div> set req.http.Cookie = regsuball(req.http.Cookie, "__utm.=[^;]+(; )?", "");</div><div> if (req.http.cookie ~ "^ *$") {</div>
<div> remove req.http.cookie; } }</div><div><br></div><div> if (req.url ~ "^/r/\d+/") {</div><div> return(pass); }</div><div><br></div><div> # Don't cache if specific HTTP headers exist</div>
<div> if (req.http.Expect) {</div><div> return(pass); }</div><div><br></div><div> if (req.http.Authorization) {</div><div> return(pass); }</div><div>return(lookup);}</div><div><br></div><div>sub vcl_deliver {</div>
<div> return (deliver);}</div><div><br></div><div>sub vcl_fetch {</div><div> set obj.ttl = 120m;</div><div><br></div><div>unset obj.http.set-cookie;</div><div> if (req.url ~ "^/$") {</div><div> set obj.ttl = 1800s;}</div>
<div><br></div><div> # Don't cache error pages</div><div> if (obj.status == 503) {</div><div> return(pass); }</div><div><br></div><div> if (obj.http.Vary == "Cookie") {</div><div> remove obj.http.Vary;</div>
<div> }</div><div> if (obj.http.Vary == "Cookie,Accept-Encoding") {</div><div> set obj.http.Vary = "Accept-Encoding"; }</div><div><br></div><div> # Anti-dogpiling feature - serve a stale request until a new one</div>
<div> # can be fetched, for up to 30s</div><div><br></div><div> if (!obj.cacheable) {</div><div> return(pass); }</div><div><br></div><div> return(deliver);}</div><div><br></div><div>sub vcl_hit {</div>
<div> remove obj.http.Set-Cookie;}</div><div><br></div></div>