Nginx cache and default error pages

Quick question:

Are hardcoded default error pages being cached when *_cache directives
specify their HTTP error code? Or does it only apply to pages specified
with the error_page directive?
​​

B. R.

Hello!

On Sun, May 11, 2014 at 09:13:38PM +0200, B.R. wrote:

Quick question:

Are hardcoded default error pages being cached when *_cache directives
specify their HTTP error code? Or does it only apply to pages specified
with the error_page directive?

By default, nginx will cache pages as returned by an upstream
server, regardless of status codes.

If you use proxy_intercept_errors to overwrite error pages
returned by the upstream, this applies to error codes with
corresponding error_page set only.


Maxim D.
http://nginx.org/