install varnish on nginx using memcached and ssl

Has anyone using nginx with ssl and memcached ever got varnish running and if so, how? I am running elgg 2.3.3