Bug: custom error_page doesn't work for HTTP 413 (content too large)

Peter Vandenberk pvdb at bragster.com
Mon Aug 31 19:38:44 MSD 2009


pvdb <nginx-forum at ...> writes:
> I am dealing with the same requirement (implement a custom 
> 413 nginx error page) and am banging my head against the 
> wall for the same reason that Mike describes in his original post.
> 
> Posted at Nginx Forum: 
> http://forum.nginx.org/read.php?2,2620,5422#msg-5422

It appears that the cross-posting between the two mailing lists 
has truncated my original post... 

Here's a bit more context from Mike's original post:

> The problem I'm having is I can't seem to set a custom error page for
> HTTP 413 errors. If I issue a file upload to an nginx url and it
> exceeds the maximum size set in my configuration, I want the custom
> error page to show. Instead I get the nginx default.
> 
> error_page 413 /err/413.html
> 
> when I upload will give me something like this in my error log: ...

Basically I'm having the same issue, and no matter how many different
variations of my nginx.conf I try, I can not get it to serve my custom 
413.html error page, but *always* serves the default nginx 413 one.

Here's the relevant snippet from my nging.conf file:

        error_page  413              /413.html;
        location = /413.html {
            root   /usr/local/nginx/html;
        }

Any ideas?  Many thanks in advance,

Peter Vandenberk







More information about the nginx mailing list