How to make nginx return response body for 4xx and 5xx?

Maxim Dounin mdounin at
Wed Dec 9 16:23:08 UTC 2015


On Wed, Dec 09, 2015 at 10:57:08AM -0500, ibmed wrote:

> Looks like nginx removes response body when HTTP code is 4xx/5xx.
> Is there a way to make nginx proxy the original response body?

This is what nginx does by default.  If you see response bodies 
removed in your setup, you've probably explicitly asked nginx to 
do so using the proxy_intercept_errors directive.  See for details.

Maxim Dounin

More information about the nginx mailing list