It has become pretty clear to me that the Varnish settings offered by Cloudways are greatly inadequate, I would even say flawed.
First off, there is no proper documentation. Tooltips are not documentation. The knowledgeable base articles lack in details and are not replacements for proper documentation. How do I know what the proper regex syntax is? Are the conditions logically ORed? What applies to client to backend requests versus backend to client responses?
Secondly, Cloudways refuses to publish its VCL code. Therefore there is no way to know how the settings are being used.
Lastly, looking the default varnish 4 VCL code here:
it is pretty obvious that configuring varnish properly requires the use of code that cannot be addressed with the current settings offered by Cloudways.
I mean, sure it works perfectly well on a static website. But I certainly cannot make it work on my custom Woocommerce websites. I see the varnish cache unsetting the cookies woocommerce is trying to set before the backend response reaches the client. Here is an extract of varnishlog:
- BerespUnset Set-Cookie: wp_woocommerce_session_78923a91d786864d0ee9c9e403f4a1b8=c4c510f31ba9cba95d988224f5f2e847%7C%7C1511341646%7C%7C1511338046%7C%7C8a26fca69f2e9a5e7ff9f6cf2293a40c; expires=Wed, 22-Nov-2017 09:07:26 GMT; Max-Age=172800; path=/
- BerespUnset Set-Cookie: woocommerce_items_in_cart=1; path=/
- BerespUnset Set-Cookie: woocommerce_cart_hash=2f2d19b301ba8355710b85c4a158dc63; path=/
Which is Varnish messing with the backend response? By the way, I have excluded all the above cookies in the provided varnish settings.
Anyone has a similar or opposite experience?