How to fix error: “413 Request Entity Too Large” when upload files


When upload files, you might got the error “413 Request Entity Too Large”, how to fix this error?

413 error

Add or modify client_max_body_size in http block of your config file like nginx.conf

Example:

	client_body_buffer_size 256k;
    client_body_in_file_only off;
    client_body_timeout 60s;
    client_header_buffer_size 64k;
    client_header_timeout  20s;
    client_max_body_size 100m;

Or you can disable the body size check:

client_max_body_size 0;

Now, restart nginx 😀

Related
Nginx: how to fix error 413 Request Entity Too Large
ExpressJS: How to fix error: 413 (Payload Too Large)

2 Comments

Leave a Reply