nginx error: 413 Request Entity Too Large

Encountered this error when I tried to upload a large file. nginx default is too small. To upload bigger file, add this line in /etc/nginx/nginx.conf, somewhere inside the http section:

http {
    ....
    client_max_body_size 20M;
    ....
}

Save, and then restart your nginx instance.