node.js - How to throw a 502 to nginx? -
i have nginx/nodejs stack.
my nginx configured serve static 502 error page when nodejs process down.
now, want have nodejs run normally, , throws 502 nginx, trigger static 502 page on user requests. how do that?
i tried throw errors in node process without catching them, results in error stack being passed directly client browser.
add proxy config:
proxy_intercept_errors on; as per the manual:
determines whether proxied responses codes greater or equal 300 should passed client or redirected nginx processing error_page directive. default off
Comments
Post a Comment