Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
Your issue might be with an incorrect Varnish configuration, or it could be a problem with the Nginx configuration and how it interacts with Varnish. You mentioned that you have made the suggested changes by Magento docs, but still experiencing issues.
In your Varnish default.vcl, it’s important to properly set backend settings pointing to your Nginix and ensure that req.http.host is correctly defined.
Consider modifying your Varnish configuration and take care of the following points:
- Make sure your backend default points Nginx correctly. Confirm the health status of your backend server after modifying the Varnish settings with the command: varnishadm debug.health-
Ensure that the req.http.host is correctly defined for your domain.
If the problem persists after making these changes, please refer to the DigitalOcean Docs at How To Configure Varnish Cache and How To Configure Nginx as a Web Server and Reverse Proxy for Apache on One Ubuntu 20.04 Server. These articles provide a detailed overview of configuring Varnish with Nginx. If all else fails, you may consider seeking further assistance from the Magento community forums.
Hope that this helps!