I would like to set up Varnish as reverse proxy cache for Apache.
How can I setup Varnish so that it does not cache content from a particular folder (and its subfolders), let's say /public_html/shop/
I would like to set up Varnish as reverse proxy cache for Apache.
How can I setup Varnish so that it does not cache content from a particular folder (and its subfolders), let's say /public_html/shop/
You'd want something like this in your vcl_recv
:
if (req.url ~ "^/path/to/exclude/") {
return (pass);
}
You'll probably need to familiarize yourself with the basics of what the default VCL is doing and adjust for your content - for example, by default, it'll avoid caching anything when the client sends any cookies on the assumption that your content might vary based on sent cookies.