Reputation: 43
I recently deployed a django app to digital ocean using gunicorn and nginx, the app is working but while trying to upload files, it threw an error
413 request entity too large
I've tried some suggestions on this stackflow which state that there is need to add client_max_body_size
to /etc/nginx/nginx.conf
, when I did this, an error
client_max_body_size directive not allowed in /etc/nginx/nginx.conf
was thrown. I really do not know what to do.
Upvotes: 1
Views: 2482
Reputation: 449
Check if client_max_body_size is properly declared as it may need additional configuration. Also, set the upload_max_filesize, post_max_size. Check this article
Upvotes: 2