in Linux, Programming

How To Fix HTTP Error Code 413 on Nginx Web Server

On early days at building Tado, I encountered a HTTP error code 413 when I sent a request from my mobile app to the API. The server is using Linux, and the web server is using Nginx. Here is how to fix that.

Since the server Linux is using AWS AMI so the config file is at:

/etc/nginx/nginx.conf

After that find client_max_body_size. I usally using nano to edit the file, so I can easily find the occurrence using CTRL + W. Then after that set the value with the one you needed. Don’t slip when set the value. Big ‘M’ mean Mega Byte, and small ‘m’ mean Mega Bit.

Cheers!!

Write a Comment

Comment