Docker push nexus private repo fail, 413 Request Entity Too Large

As it turns out, the linux distro running the containered nginx server was itself running a variation of nginx for any incoming request.

Once we set the client_max_body_size to 0 on the nginx configuration file which the OS ran, it worked.


That's due to your server block having a default value for client_max_body_size of around 1MB in size when unset.

To resolve this, you will need to add the following line to your server block:

# Unlimit large file uploads to avoid "413 Request Entity Too Large" error
client_max_body_size 0;

http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size