I have a seemingly simple question about configuration, but have been
unable to find the answer through searching so far. I just want to
override
the default 504 page when the upstream server times out, which I would
have
thought would be handled by the error_page setting. Can anyone help?
My config looks like this (the variables are replaced before nginx is
started):
upstream jsweb {
server 127.0.0.1:8091;
}
server {
listen $PORT$;
server_name localhost;
root $CONTENT_ROOT$;
On Fri, Dec 23, 2011 at 10:59 AM, Dustin Moskovitz [email protected] wrote:
I have a seemingly simple question about configuration, but have been unable
to find the answer through searching so far. I just want to override the
default 504 page when the upstream server times out, which I would have
thought would be handled by the error_page setting. Can anyone help?
2011/12/23 03:50:35 [error] 13736#0: *9 upstream timed out (110: Connection
timed out) while reading response header from upstream, client:
10.214.178.111, server: localhost, request: “GET /-/forgot_password
HTTP/1.1”, upstream: “http://127.0.0.1:8091/”, host: “staging.myapp.com”
And what’s wrong? Everything looks fine from here: nginx will log
error and return error to client as specified in “$OUTAGE_PAGE$”
(I assume it’s something obfuscated or expanded by your
configuration system).
On Sat, Dec 24, 2011 at 3:21 AM, Dustin Moskovitz [email protected] wrote:
Thanks - that looks right on. I will give it a shot on Monday when I’m back
at the office.
sorry, my bad. You don’t need the proxy_intercept_errors, you just
need to specify “location = $OUTAGE_PAGE$ { }” block or make sure it’s
not handled by “location / { }” block.