<div>Folks,</div>
<div> </div>
<div>I have changed the configuration to the following (mostly based on mediawiki). Any idea why it does not restart? Sill empty logs.</div>
<div> </div>
<div>[root@net2 ~]# varnishd -V<br>varnishd (varnish-2.0.4)<br>Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS</div>
<div> </div>
<div>[root@net2 ~]# cat /etc/varnish/default.vcl</div>
<div> </div>
<div># set default backend if no server cluster specified</div>
<div>backend default {<br> .host = "<a href="http://www.google.ru/">www.google.ru</a>";<br> .port = "80";<br>}</div>
<div>backend google-bg {<br> .host = "<a href="http://www.google.bg/">www.google.bg</a>";<br> .port = "80";<br>}</div>
<div>backend google-pl {<br> .host = "<a href="http://www.google.pl/">www.google.pl</a>";<br> .port = "80";<br>}</div>
<div># access control list for "purge": open to only localhost and other local nodes<br>acl purge {<br> "localhost";<br>}</div>
<div># vcl_recv is called whenever a request is received<br>sub vcl_recv {</div>
<div> # Serve objects up to 2 minutes past their expiry if the backend<br> # is slow to respond.<br> set req.grace = 120s;</div>
<div> # Use our round-robin "apaches" cluster for the backend.<br> if (req.http.host ~ "^(<a href="http://www.)/?google.bg$">www.)?google.bg$</a>") {<br> set req.http.host = "<a href="http://www.google.bg/">www.google.bg</a>";<br>
set req.backend = google-bg;<br> }<br> elsif (req.http.host ~ "^(<a href="http://www.)/?google.pl$">www.)?google.pl$</a>") {<br> set req.http.host = "<a href="http://www.google.pl/">www.google.pl</a>";<br>
set req.backend = google-pl;<br> }<br> else {<br> set req.backend = default;<br> }</div>
<div> # This uses the ACL action called "purge". Basically if a request to<br> # PURGE the cache comes from anywhere other than localhost, ignore it.<br> if (req.request == "PURGE") {<br>
if (!client.ip ~ purge) {<br> error 405 "Not allowed.";<br> }<br> lookup;<br> }</div>
<div> # Pass any requests that Varnish does not understand straight to the backend.<br> if (req.request != "GET" && req.request != "HEAD" &&<br> req.request != "PUT" && req.request != "POST" &&<br>
req.request != "TRACE" && req.request != "OPTIONS" &&<br> req.request != "DELETE")<br> {pipe;} /* Non-RFC2616 or CONNECT which is weird. */</div>
<div> # Pass anything other than GET and HEAD directly.<br> if (req.request != "GET" && req.request != "HEAD")<br> {pass;} /* We only deal with GET and HEAD by default */</div>
<div> </div>
<div> # Pass requests from logged-in users directly.<br> if (req.http.Authorization || req.http.Cookie)<br> {pass;} /* Not cacheable by default */</div>
<div> # Pass any requests with the "If-None-Match" header directly.<br> if (req.http.If-None-Match)<br> {pass;}</div>
<div> # Force lookup if the request is a no-cache request from the client.<br> if (req.http.Cache-Control ~ "no-cache")<br> {purge_url(req.url);}</div>
<div> # normalize Accept-Encoding to reduce vary<br> if (req.http.Accept-Encoding) {<br> if (req.http.User-Agent ~ "MSIE 6") {<br> unset req.http.Accept-Encoding;<br> } elsif (req.http.Accept-Encoding ~ "gzip") {<br>
set req.http.Accept-Encoding = "gzip";<br> } elsif (req.http.Accept-Encoding ~ "deflate") {<br> set req.http.Accept-Encoding = "deflate";<br> } else {<br>
unset req.http.Accept-Encoding;<br> }<br> }</div>
<div> lookup;<br>}</div>
<div>sub vcl_pipe {<br> # Note that only the first request to the backend will have<br> # X-Forwarded-For set. If you use X-Forwarded-For and want to<br> # have it set for all requests, make sure to have:<br>
# set req.http.connection = "close";</div>
<div> # This is otherwise not necessary if you do not do any request rewriting.</div>
<div> set req.http.connection = "close";<br>}</div>
<div># Called if the cache has a copy of the page.<br>sub vcl_hit {<br> if (req.request == "PURGE")<br> {purge_url(req.url);<br> error 200 "Purged";}</div>
<div> if (!obj.cacheable)<br> {pass;}<br>}</div>
<div># Called if the cache does not have a copy of the page.<br>sub vcl_miss {<br> if (req.request == "PURGE")<br> {error 200 "Not in cache";}<br>}</div>
<div># Called after a document has been successfully retrieved from the backend.<br>sub vcl_fetch {</div>
<div> # set minimum timeouts to auto-discard stored objects<br># set obj.prefetch = -30s;<br> set obj.grace = 120s;</div>
<div> if (obj.ttl < 48h) {<br> set obj.ttl = 48h;}</div>
<div> if (!obj.cacheable)<br> {pass;}</div>
<div> if (obj.http.Set-Cookie)<br> {pass;}</div>
<div># if (obj.http.Cache-Control ~ "(private|no-cache|no-store)")<br># {pass;}</div>
<div> if (req.http.Authorization && !obj.http.Cache-Control ~ "public")<br> {pass;}</div>
<div>}</div>
<div> </div>
<div>Any hint most welcome.</div>
<div> </div>
<div>Regards.</div>
<div> </div>
<div>Vladimir<br></div>