Varnish non-https connection back-end server

I'm using a HTTPS connection for my webshop to have a secure connection for my users, but now I would like to add Varnish for faster pageloads but which doesn't support SSL.

So the idea to still implement Varnish is this setup:Varnish non-https connection back-end server

Well except for User A cause I redirect all users to use the https:// webaddress. So the user connects to the server with a HTTPS connection, Nginx terminates HTTPS so varnish can be used.

But my question: What is a save connection between my Varnish server and my actual Back-end server (the LAMP server in this case, which is a LEMP server in my case)? Cause I was thinking of private networking at Digital Ocean (where my current servers are hosted). But their servers with 4GB of RAM (which I would like to use for Varnish) are quite expensive!

So I was thinking of getting a bit more affordable server with 4GB of RAM somewhere else as my Varnish server, in a different datacenter, and connect to my back-end server at Digital Ocean. But in that case I cannot use private networking. But is this OK or not that safe?

Is it safe to have a non-https connection between my varnish server and back-end server? I suppose it's just OK, but to be sure, I hope someone over here can give me some advice.


If Varnish_VPS and LAMP_VPS are not in the same trusted network, you need encryption (and authentication) between both. If you don't, other users on the network of either cloud provider can sniff or manipulate your data.

There are a couple of ways you can do this:

  • HTTPS - could be self-signed, because you have full control over the client (Varnish).
  • VPN - this makes it seem that the servers are both in the same network, which is useful for other data besides HTTP.
  • SSH tunnel - a poor man's VPN. This could be fragile because it is not really meant for permanent use.
Category: tls Time: 2016-07-29 Views: 1
Tags: nginx openssl tls

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.227 (s). 12 q(s)