<div dir="ltr"><font size="4">HI, I use the varnish-2.0-rc1.tar.gz ,I install it without any error ,and configure the vcl.conf . Check it by FireBug ,<br>FireBug display :</font><br> <table selected class="netInfoHeadersText netInfoText netInfoHeadersTable" cellpadding="0" cellspacing="0">
<tbody class=""><tr class=""><td class="netInfoParamName">Date</td><td class="netInfoParamValue">Tue, 14 Oct 2008 09:37:00 GMT</td></tr><tr class=""><td class="netInfoParamName">X-Varnish</td><td class="netInfoParamValue">
681905755 681731196</td></tr><tr class=""><td class="netInfoParamName">Age</td><td class="netInfoParamValue">12553</td></tr><tr class=""><td style="color: rgb(255, 0, 0);" class="netInfoParamName">Via</td><td style="color: rgb(255, 0, 0);" class="netInfoParamValue">
1.1 varnish</td></tr></tbody></table><br><span style="color: rgb(255, 0, 0);">(why the firebug display the varnish is 1.1 ,is not 2.0. Is it the HTTP 1.1 ?)</span><br><br> <font size="4">As a result Varnish is running well . but I use <b>varnishstat</b> check varnish ,It's bad, the cache_hit is 0 .</font><br>
<br>0+06:34:09 imobile-23<br>Hitrate ratio: 0 0 0<br>Hitrate avg: 0.0000 0.0000 0.0000<br><br> 38 0.00 0.00 Client connections accepted<br>
105 0.00 0.00 Client requests received<br> <span style="color: rgb(204, 0, 0);"> 0 0.00 0.00 Cache hits</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> 0 0.00 0.00 Cache hits for pass</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> 0 0.00 0.00 Cache misses</span><br> 165 0.00 0.01 Backend connections success<br> 0 0.00 0.00 Backend connections not attempted<br>
0 0.00 0.00 Backend connections too many<br> 0 0.00 0.00 Backend connections failures<br> 146 0.00 0.01 Backend connections reuses<br> 165 0.00 0.01 Backend connections recycles<br>
0 0.00 0.00 Backend connections unused<br> 1 . . N struct srcaddr<br> 0 . . N active struct srcaddr<br> 13 . . N struct sess_mem<br>
1 . . N struct sess<br> 0 . . N struct object<br> 9 . . N struct objecthead<br> 3 . . N struct smf<br>
0 . . N small free smf<br> 3 . . N large free smf<br> 1 . . N struct vbe_conn<br> 6 . . N struct bereq<br>
<br><br><font size="4">I don't know it's my mistake or it's the varnish's bug. if it's my mistake tell me why .The following is my vcl.conf</font><br><br>backend default {<br> .host = "<a href="http://192.168.0.24">192.168.0.24</a>";<br>
.port = "80"; ;<br>}<br><br>acl purge {<br> "localhost";<br> "<a href="http://192.168.0.0">192.168.0.0</a>"/16;<br>}<br><br>sub vcl_recv {<br> # Handle special requests<br>
if (req.request != "GET" && req.request != "HEAD") {<br> # POST - Logins and edits<br> if (req.request == "POST") {<br> pass;<br>
#pipe;<br> }<br><br> # PURGE - The CacheFu product can invalidate updated URLs<br> if (req.request == "PURGE") {<br> if (!client.ip ~ purge) {<br>
error 405 "Not allowed.";<br> }<br> lookup;<br> }<br> }<br><br> # Don't cache authenticated requests<br>
if (req.http.Cookie && req.http.Cookie ~ "__ac(|_(name|password|persistent))=") {<br><br> # Force lookup of specific urls unlikely to need protection<br> if (req.url ~ "\.(jpeg|png|js|css)") {<br>
unset req.http.cookie;<br> lookup;<br> }<br> pass;<br> }<br><br> if (req.http.Cookie) {<br> unset req.http.cookie;<br> lookup;<br>
}<br><br> # The default vcl_recv is used from here.<br>}<br><br># Do the PURGE thing<br>sub vcl_hit {<br> if (req.request == "PURGE") {<br> set obj.ttl = 0s;<br> error 200 "Purged";<br>
}<br>}<br>sub vcl_miss {<br> if (req.request == "PURGE") {<br> error 404 "Not in cache";<br> }<br>}<br><br>I send the bug for the first time ,I don't know the form is right or wrong ? I hope write it back ,Thank you !<br>
<br><br><br></div>