If your Magento store uses the Varnish, you need to take additional steps to integrate it with NitroPack. By configuring this setup, NitroPack will synchronize both cache layers, optimizing your website's performance to the fullest extent.
Before you start
Make sure your Magento store has:
Configuring NitroPack with Varnish
Step 1: Update your Full Page Caching settings in Magento Admin
Log in to the admin section of your Magento website.
Navigate to Stores > Configuration > Advanced > System.
Expand the 'Full Page Cache' section.
Choose NitroPack' in the 'Caching Application' dropdown.
Expand the 'Enable Varnish field and select “Yes.”
Input your Varnish’s IP address and port in the Reverse Proxy IP (<ip>:<port>) e.g., 127.0.0.1:443
Step 2: Clean up the cache
Flush your Magento cache using the following commands:
php bin/magento cache:clean
php bin/magento cache:flush
Step 3: Verify that it works
Navigate to Magento Admin > NitroPack to review your NitroPack settings and confirm that your pages are in the process of being optimized.
Follow the steps provided in this article, load your website, and check the response headers for the following:
X-Nitro-Cache should have the value HIT (indicating NitroPack’s status)
X-Magento-Debug should have the value HIT (indicating Varnish status)
Please make sure that both response headers are present and verify the proper configuration of your Magento website with Varnish and NitroPack.
Note: If you are unable to get the HTTP response header X-Magento-Debug, comment the line in a file (/etc/varnish/default.vcl)
# unset resp.http.X-Magento-Debug;
📌 If you need any assistance or have questions, contact our support team at [email protected] or via the chat bubble at the bottom right corner.