This error occurs when your backend is an Apache server and you transfer SSL flows to SSL.
In other words, your reverse proxy connects to your Apache server via SSL.
An error occur:
Request Entity Too Large The requested resource xxxx does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit
And in Apache events:
request body exceeds maximum size (xxxx) for SSL buffer
could not buffer message body to allow SSL renegotiation to proceed
To solve this issue add in your apache configuration file:
<Location "/upload">
SSLRenegBufferSize 10486000
</Location>
The key is the exact location of the URL that causes HTTP error 413.
The location directive must indicate the exact location of the URL.
SSLRenegBufferSize is the param which specifies the max buffer size in bytes in case a renegotiation happened.
This example set it to 10 MB. Apache default is 128KB.