Question about Cache Purge

2009-07-13 Thread Brian Pan
Hi all,

I have a newbie question regarding 'purging the cache.'  When I run the 
following command to purge the root domain of my website,

varnishadm -T localhost:80  purge.url ^/$

I get this error:

An error occured in receiving status.

Based on examples, I've setup my VCL as follows:

//
acl purge {
localhost;
my local ip address;
}

sub vcl_recv {
# Allow wildcard purging
if (req.request == PURGE){
if (!client.ip ~ purge) {
error 405 Not allowed.;
}
purge_url(req.url); }
...

//***

Any help would be greatly appreciated.

Thanks,
Brian
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Varnish Cache and Page Load Time

2009-04-24 Thread Brian Pan
I have a two websites on a server running behind varnish.  One of the
websites is a Wordpress blog (with php, mysql etc..).  The other is a
simple html (without php or mysql) website.  Using Firefox's Yslow
add-in to check page load times, I have found that the simple html page
is served in 0.5 seconds, whereas it takes 1.4-1.7 seconds to load the
Wordpress site.  \

 

With the varnish cache working, shouldn't the time to load both sites be
approximately the same?  Or am I missing something?  Any thoughts or
ideas about how I could decrease the page load time of the Wordpress
site?  

 

Thanks for your help, 

 

Brian Pan

brian@light-mc.com

 

 

 

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


IP and mod_rpaf

2008-09-10 Thread Brian Pan
Here's an apache module that might be useful for some people:

 

http://stderr.net/apache/rpaf/

 

It's similar to mod_extracted_forward'.  It rewrites the remote_addr
for apache on the backend, so that Apache logs will see the client IP
address and not varnish server's address. 

 

I also added this to the .vcl as was recommended in the Varnish FAQ:

 

sub vcl_recv {
  # Add a unique header containing the client address
  remove req.http.X-Forwarded-For;
  setreq.http.X-Forwarded-For = client.ip;
  # [...]
}

 

It's also useful if you're using mod_bwshare - and are trying to
throttle usage by IP address. 

 

 

--

Brian Y. Pan

Light Management Consulting LLC

Princeton, NJ 08540   USA

 

Tel: +1 (609) 651-4779

Fax: +1 (609) 651-4799

 

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc