nginx (http + https) on the front with varnish behind

view full story

http://serverfault.com – 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. (HowTos)