How to fix "413 Request Entity Too Large" in Nginx

1. Edit the "http" block: ( Will apply settings globally )

 

Create a new file in the conf.d directory for Nginx.

 

touch /etc/nginx/conf.d/maxuploadsize.conf

 

2. Edit the new file: "/etc/nginx/conf.d/maxuploadsize.conf" to add below syntax to set 500m limit:

 

client_max_body_size 500m;

 

3. Restart Nginx and FPM.

 

/scripts/restartsrv_nginx
/scripts/restartsrv_apache_php_fpm
  • Entity Too Large cpanel, 413 Request Entity, cpanel nginx
  • 31 Users Found This Useful
Was this answer helpful?

Related Articles

Install ionCube Ubuntu 20.04 for PHP 7.4

First, make sure that all your system packages are up-to-date by running the following apt...

How To Install ionCube for whmcs in linux server

  Step 1 — Choosing the Right ionCube Version Create a file called info.php file in the root...