less than 1 minute read

413 ERROR: Request Entity too large

💭 What is 413 Error and how to fix it?

  • 🧐 413 Error occurs when the request file sent by client is larger than limits defined by server
  • 413 Error can be fixed by increasing the defined limits in the Nginx configuration file

    1. Find Nginx server config file

    First of all, find the Nginx config file and open it. It’s located in /etc/nginx/nginx.conf 📋 < Ubuntu Terminal >

    sudo vim /etc/nginx/nginx.conf
    

2. Change/Add ‘client_max_body_size’ value

Change/add the value of a variable ‘client_max_body_size’ as below: 📋 < Ubuntu Terminal >

client_max_body_size 100M;

image


3. Restart Nginx

📋 < Ubuntu Terminal >

sudo service nginx restart

Reference:

https://medium.com/@svsh227/error-413-request-entity-too-large-in-nginx-with-client-max-body-size-changes-in-nginx-6aacd525fe11#:~:text=for%20this%20story.-,Error%3A%20413%20%E2%80%9CRequest%20Entity%20Too%20Large%E2%80%9D%20in%20Nginx%20with,Changes%20in%20Nginx%20config%20file.&text=This%20is%20happening%20because%20of,to%20modify%20your%20nginx%20configuration.

Any advice and suggestions are welcome and appreciated!

Categories:

Updated: