nginx error: client intended to send too large body

After moving this to DigitalOcean‘s , I found a problem when uploading a from my blog posting interface. Looking up from the log, it says "client intended to send too large body: 1122400 bytes". I wanted to upload a file larger than 1 MB. I’m using for the web , and the solution is pretty simple.

Edit /etc/nginx/nginx.conf file, and add client_max_body_size 20M; between http { }. Save the config file and start the nginx. Problem solved. If you need higher value, just change the 20 MB to something higher.