I have successfully set up varnish 4 on my nginx 1.6.2 it is working but as per the test on
http://www.isvarnishworking.com/
it shows
Varnish appears to be responding at that url, but the Cache-Control header's "max-age" value is less than 1, which means that Varnish will never serve content from cache at this url.
The max-age value appears to be: 0
This may be intentional, but if you want Varnish to cache this url you'll have to fix the max-age value the application is sending to Varnish.
That means it is not working but not as expected and searched for config files for it but due to huge changes in version 4 of varnish those config files are not working.
Please help me guys.
Thanks
Best Answer
Resurrecting an old post, I know, but wanted to put this here for anyone that comes across the same issue.
First you're going to want to drop cookies for users that aren't logged in. Here's a section from my vcl_recv sub:
Also in your backend response you want to drop cookies if you're not logged in. You also need to instruct varnish to set the TTL for the beresp so Age doesn't always show 0.
That's the basics.