How to fix "413 Request Entity Too Large" in Nginx

1. Edit the "http" block: ( Will apply settings globally )


Create a new file in the conf.d directory for Nginx.


touch /etc/nginx/conf.d/maxuploadsize.conf


2. Edit the new file: "/etc/nginx/conf.d/maxuploadsize.conf" to add below syntax to set 500m limit:


client_max_body_size 500m;


3. Restart Nginx and FPM.


Was this answer helpful? 2 Users Found This Useful (2 Votes)