My apologies if that question is already asked – I searched thru all related questions but found a similar not exact match to my problem.
What is my set:
- Magento 2.4.3 running on Ubuntu 22.04 server with Apache 2
- Magento is set to production mode
What I’ve done to try enabling Varnish:
- I’ve installed varnish on my Ubuntu server
- I’ve enabled the Varnish cache from Magento Admin Panel
- Access list & Backend host is to be equal to my Server’s IP
- VCL file is exported to the varnish directory and replaces the default.vcl file (with the same name)
- I’ve restarted both Varnish and Apache services
- run Magento (compile, upgrade, cache clean, and static content deploy)
I follow that instruction https://experienceleague.adobe.com/en/docs/commerce-operations/configuration-guide/cache/configure-varnish-commerce
What I get as a result:
- Varnish cache is shown as running (after I check with
systemctl status varnish
) - Magento store is running fine (both frontend and admin panel are accessible)
- Headers are not showing X-Varnish or X-Magento-Cache or anything different before the operation was executed
Attached you may find the result I get from curl -I -v –location-trusted mywebsite.com
I did not change the .vcl file that Magento exports (should I?)
If you need any more information I am glad to provide.
Please excuse my incompetence if there’s any (I am an amateur in this whole process)