AnselTaft.com
Entrepreneur, WordPress integrator, SEO strategist, and a not-so-horrible writer

How To Add Varnish In Front Of An NGINX Front End Proxy With Apache On DirectAdmin, That’s WordPress-Friendly

  1. Start with Poralix's NGINX + Varnish + Apache on Directadmin powered server post as an overall guide
  2. First, Add the Extra Packages for Enterprise Linux (EPEL) repository to your server and straight after that, install Varnish using Yum. Focus on the section titled Varnish 4.1
  3. Switch back to the overall guide and finish the installation by modifying your DirectAdmin installation as instructed.
  4. Next, update /etc/varnish/default.vcl with this one.
  5. Now let's start Varnish:

    Note: the following command assumes you're on a CentOS 7 box

    service varnish start

    If no errors appear Varnish just started and you now have a front end cache ahead of an NGINX front end proxy in front of an Apache web server.

  6. Last step, set Varnish to autostart every time you reboot the server :

    Note: again, the following command is for a CentOS 7 box

    sudo systemctl enable varnish.service
  7. All set! Varnish should now be running in front of NGINX and apache as a front end cache. Much win!

Leave a reply