Weblutions Documentation > Knowledgebase > NGINX Upload Limits [413 Entity Too Large]

NGINX Upload Limits [413 Entity Too Large]

Have you been using Nginx and have come across this annoying message?

nginxerror

This might just be the place you're looking for. By default NGINX comes with a rather small upload limit for mainly security and disk usage reasons. However, this is a simple to change issue for all. Follow the below steps for a quick fix on this issue.

Open The Config File

By default there will be an NGINX config file located at

/etc/nginx/nginx.conf

Open this file via SMTP or the nano command

Applying The Fix

Now this file is structured in a particular way. So we can't go around placing this anywhere.

In the HTTP block (after http {) we want to place our line.

client_max_body_size 1000M; # This will increase the limit to 1GB. Measured in MB.

Keep note that setting it to 0 disables checking of client request body size.

(client_max_body_size 0; # Disables checking client body size)

applythefix

Once complete save the file and close.

Finishing Up

Now there's one last thing to check before applying our changes.

We first want to double check our syntax to ensure we have entered the information correctly

Run this command in your terminal to check the syntax of our edits.

nginx -t

Our expected output should be all good

termout

If all is well then restart NGINX to apply our changes in full

service nginx restart


Suggest an edit

Review this page

FAXES

nginx error nginx config 413 error

1 recommend this page