0

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

1
  • Problem solved. The problem was, since I can only use 2 ports per IP address, Varnish was attempting to connect to the SSH server, running on 443 on another IP. Simply setting it to listen to the IP NGINX is binded on removed the error.
    – lcarpenter
    Oct 13, 2010 at 16:48

2 Answers 2

3

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.

1
  • 1
    I have to use 443, since there are only two ports available for me to access due to the firewalling system at college, where the site is going to get used the most. There is no SSL involved.
    – lcarpenter
    Oct 13, 2010 at 16:45
0

503 usually means that the backend didn't respond quickly enough or the connection closed right when it tried to do the request. You can alter the grace timer (if the backend was down/refused connection), alter the wait for the backend to get a response or modify a few other settings depending on why you got the 503.

running varnishlog (piping it/typescript) and watching those requests can tell you why something happened. You can specify the IP address to watch, so, you don't need to see all of the traffic coming across, just the traffic from your IP.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .