When to use Varnish in front or behind NGinx

Lee Daniel lee at caribbeannewmedia.com
Fri Aug 30 13:58:32 UTC 2024


Hey Guys,

So happy to find this mailing list.
I am 2-3 weeks into using Varnish Cache for the first time.

I am on a Plesk Webserver with multiple domains (Mainly Drupal sites) 
running Centos.
Plesk has an Nginx:80 -> Apache:7080 setup.

Following Varnish documentation for 4.1.11, which is the latest version 
compatible with Drupal:

  * Changed Nginx port from 80 to 8080.
  * Changed Varnish default port from 6081 to 80.
  * Changed my default backend to point back to Nginx on port 8080.
  * So now I have, Varnish -> Nginx -> Apache

I do some test with Curl -I and get some hits.

Connected to my Drupal sites successfully.

However, doing some research I found out that Nginx does not support 
ssl/tls natively.

Therefore, if ssl/tls termination needed, Varnish would have to be 
placed behind NGinx.

e.g Nginx:80 -> Varnish:6080 -> Apache:7080

My job was to install Varnish on our servers to be used on specific 
sites for Caching purposes.

I've read that Varnish first if you mainly want Caching and the full 
power of Varnish or Varnish behind Nginx if you want ssl termination and 
reduced power of Varnish Caching.


Can someone please weigh in on this?
Weigh in heavy if you must ��

Regards.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20240830/7aa33539/attachment.html>


More information about the varnish-misc mailing list