watch the varnish ,no data
Ajian
ajian521 at gmail.com
Tue Oct 14 12:04:50 CEST 2008
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 ,
FireBug display :
DateTue, 14 Oct 2008 09:37:00 GMTX-Varnish681905755 681731196Age12553
Via1.1 varnish
(why the firebug display the varnish is 1.1 ,is not 2.0. Is it the HTTP 1.1
?)
As a result Varnish is running well . but I use *varnishstat* check
varnish ,It's bad, the cache_hit is 0 .
0+06:34:09
imobile-23
Hitrate ratio: 0 0 0
Hitrate avg: 0.0000 0.0000 0.0000
38 0.00 0.00 Client connections accepted
105 0.00 0.00 Client requests received
0 0.00 0.00 Cache hits
0 0.00 0.00 Cache hits for pass
0 0.00 0.00 Cache misses
165 0.00 0.01 Backend connections success
0 0.00 0.00 Backend connections not attempted
0 0.00 0.00 Backend connections too many
0 0.00 0.00 Backend connections failures
146 0.00 0.01 Backend connections reuses
165 0.00 0.01 Backend connections recycles
0 0.00 0.00 Backend connections unused
1 . . N struct srcaddr
0 . . N active struct srcaddr
13 . . N struct sess_mem
1 . . N struct sess
0 . . N struct object
9 . . N struct objecthead
3 . . N struct smf
0 . . N small free smf
3 . . N large free smf
1 . . N struct vbe_conn
6 . . N struct bereq
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
backend default {
.host = "192.168.0.24";
.port = "80"; ;
}
acl purge {
"localhost";
"192.168.0.0"/16;
}
sub vcl_recv {
# Handle special requests
if (req.request != "GET" && req.request != "HEAD") {
# POST - Logins and edits
if (req.request == "POST") {
pass;
#pipe;
}
# PURGE - The CacheFu product can invalidate updated URLs
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}
}
# Don't cache authenticated requests
if (req.http.Cookie && req.http.Cookie ~
"__ac(|_(name|password|persistent))=") {
# Force lookup of specific urls unlikely to need protection
if (req.url ~ "\.(jpeg|png|js|css)") {
unset req.http.cookie;
lookup;
}
pass;
}
if (req.http.Cookie) {
unset req.http.cookie;
lookup;
}
# The default vcl_recv is used from here.
}
# Do the PURGE thing
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged";
}
}
sub vcl_miss {
if (req.request == "PURGE") {
error 404 "Not in cache";
}
}
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 !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-bugs/attachments/20081014/2d7272a7/attachment.html>
More information about the varnish-bugs
mailing list