Author Topic

Norman Leutner

Monday 17 December 2007 8:11:19 am

Comment48700

Hi Michael,

in fact Varnish won't work with eZ if cookies are present, so you'll need to tell varnish to ignore them.

backend all2e {
  set backend.host = "cache.all2e.com";
  set backend.port = "80";
} 

sub vcl_recv {
  if (req.http.host ~ "^www.all2e.com$") {
    set req.backend = all2e;
  }
  elseif (req.http.host ~ "^all2e.com$") {
    set req.backend = all2e;
  }    
 else {
    error 404 "Unknown  virtual host";
  }
  
  # force lookup even when cookies are present
  if (req.request == "GET" && req.http.cookie) {
    lookup;
  }
  
}

Keep in mind that this will only work for static sites, where users can't login.

Getting Varnish working with the current session handling within eZ isn't possible because Exponential delivers cookies even when the user is a anonymous one.

We are currently planning to <i>hack</i> the eZ Session handling together with xrow in january. If you are also interested we should consider about 'Open funding' this.

I would not recommend to use Varnish without a new Session handling.

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh