Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have have a nginx server serving http and https and I have varnish behind to cache the apache requests

nginx (80+443) -> varnish (6081) -> apache (8081)

when I serve pages using 443, pages are already cached with port 80 (image references etc) therefore browser alerts saying there is some encrypted and unencrypted content on the page.

I cant use relative URLS.

is there a config i can keep in vcl so that it uses different hash for https requests.

share|improve this question

Why three tiers? It's making your site significantly slower than it need be.

when I serve pages using 443, pages are already cached with port 80

No - you're just mixing HTTP and HTTPS urls on your page.

share|improve this answer
need to make 3 tiers... becoz... I need http and https, I read that varnish doesnt support https, so I have nginx on the front, otherwise I can put varnish on front. – Murali Jan 25 '12 at 23:08
Varnish might not do SSL, but nginx does and also works fine as a reverse proxy. (You could use stunnel for the SSL, which eliminates the HTTP parsing, in front of varnish instead of nginx if you really want to write stuff in VCL) – symcbean Jan 26 '12 at 11:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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