I have Debian 8 with PHP 5.6 installed on my server. I recently installed Magento 2.0.2 and also successfully installed varnish-4.0.2 to use it as a cache on my web server.

I tried to configure varnish-4.0.2 with magento 2 but unfortunately, I'm getting failed every time. The reason why I am saying this because varnish is giving no such performance as compared to I previously experienced with Magento Can anyone please guide me with proper configuration and installation of varnish with magento 2?

  • any errors or headers info?? – MagenX Mar 8 '16 at 13:01
  • Have you checked the official documentation? devdocs.magento.com/guides/v2.0/config-guide/varnish/… Also how do you know it's not performing better? Do you have anything to back up this affirmation or is just an opinion? – mbalparda Mar 8 '16 at 13:09
  • @MagenX No errors but the load time is still the same with or without varnish. – Fayyaz Khattak Mar 8 '16 at 14:22
  • @mbalparda when I use same varnish installation with Magento 1.x, it is working great and also giving my application a boost. But when I am using it with Magento 2, the load time is same also I checked it from tools.pingdom.com – Fayyaz Khattak Mar 8 '16 at 14:24
  • Follow these instructions to make sure Varnish is caching content. – Steve Johnson Mar 8 '16 at 17:02

Go to Admin panel -> Configuration -> Full Page Cache -> Varnish Configuration: Use following settings:

  • Caching Application: Varnish Caching
  • TTL for public content: 86400
  • Access list: localhost
  • Backend host: IP of Varnish Server
  • Backend port: Public Port of Varnish Server

Hope this will help...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.