I'm scratching my head for 2 days with no luck. I've configured Varnish 3 with Pressflow 6 (Drupal) and everything is good i.e. Varnish is caching the pages. Now the pain is Varnish is caching even after login. So when i do logout i still see your are logged in messages etc.
I tried to set a unique cookie upon Login in modules/user/user.module file and modified the /etc/varnish/default.vcl file adding the following block.
if (req.http.Cookie ~ "(MY_UNIQUE_COOKIE)") {
return (pass);
}
Everything works as expected now but in logout script, i am not able to completely delete the cookie via PHP i.e. setting the time in minus. I believe the actual cookie goes away after the browser is closed/restarted.
So now onwards, if i don't close the browser, the cookie is there and Varnish always send every page to Apache Backend.
Any help would be highly appreciated.
Regards,
Raheel