How To Configure Varnish In Apache With Magento 2

See below step by step guide to configure varnish with Magento 2 and Apache

1) Install Varnish on server

2) Configure Varnish in Magento

Step 1

Step 2

3) Add varnish.vcl on server


5) Change varnish port from 6081 to 80

6) Change the Apache listening port from 80 to 8080

7) Restart varnish and apache service

8) Configure Varnish for the HTTPS or SSL

9) Verify varnish cache is working or not

10) How to remove (uninstall) varnish?

Wrapping Up



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store



Helping businesses Solve The Unsolved with a tech-first approach to expedite digital transformation.