Varnish throwing 503 errors when there is a healthy backend

503-errorvarnish

I have set up my web server with Passenger serving a Rails app via Nginx. I would like to put Varnish in front of Nginx to cache the web pages, since Passenger is taking its sweet time about creating pages.
I compiled Varnish, and ran it with the command

varnishd -a [external IP removed]:80 -b 127.0.0.1:443 -F

However, when visiting the external IP, I was greeted with a 503 page and a "guru meditation" code (XID: 741199024).
No idea what this means, but I think I may have configured this wrongly.
Does anybody have any idea where I went wrong?

Thank you ever so much for your time, it is greatly appreciated!
Luke Carpenter

Best Answer

Are you aware Varnish does NOT deal with HTTPS ? I'm not sure what you're trying to do, but your backend listen on 443 which is a bit weird.

If your traffic is SSL, you probably need something like nginx(ssl)-varnish(nossl)-nginx(nossl)-passenger. This setup is not that uncommon, and you can use the same nginx.