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.
What are we going to do now is, set up higher limit to it. You can try it by :
Nginx Logo. Source : DWG Logo |
What are we going to do now is, set up higher limit to it. You can try it by :
- Login as root in your linux;
- Type these command :
nano /etc/nginx/nginx.conf
- add below lines to the configuration. 2 M means 2 MB, you can customise it as your settings.
client_max_body_size 2M;
- Now, type code below
/usr/local/nginx/conf/nginx.conf
then also add client_max_body_size - Restart Nginx By typing :
service nginx restart
Now, try to upload again.