Skip to content Skip to sidebar Skip to footer

Fixing Request Entity Too Large in Self-Hosted NGINX

413 - Request Entity Too Large, is a message that appears when you try to upload a file from your self-hosted web (Eg : Wordpress) and NGINX error show up. It is a message that NGINX is actually restricting you from uploading that file because the file is too large.
Nginx Logo. Source : DWG Logo

What are we going to do now is, set up higher limit to it. You can try it by :

  1. Login as root in your linux;
  2. Type these command :
    nano /etc/nginx/nginx.conf
  3. add below lines to the configuration. 2 M means 2 MB, you can customise it as your settings.
    client_max_body_size 2M;
  4. Now, type code below
    /usr/local/nginx/conf/nginx.conf
    then also add client_max_body_size
  5. Restart Nginx By typing :
    service nginx restart
Now, try to upload again.