Nginx cache and default error pages

Maxim Dounin mdounin at mdounin.ru
Mon May 12 18:35:55 UTC 2014


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 Dounin
http://nginx.org/



More information about the nginx mailing list