Categories
General

Switch to Letsencrypt

Since my Comodo PositiveSSL Certificate for this blog is about to expired, I decided to switch to Let’s Encrypt. The implementation was easy. I was refering to DigitalOcean‘s community tutorial: How To Secure Nginx with Let’s Encrypt on Ubuntu 16.04.

Categories
General

nginx error: client intended to send too large body

After moving this site to DigitalOcean‘s cloud environment, I found a problem when uploading a file from my blog posting interface. Looking up from the error 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 nginx for the web server, and the solution is pretty simple.

Edit /etc/nginx/nginx.conf configuration 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.