How to fix error 413 Request Entity Too Large?
Configuration for Nginx:
Edit file /etc/nginx/nginx.conf add line
client_max_body_size 120m;
to http or server or location context.
You can change 120m to your own value like 2m …
Restart Nginx service
You can Configuration for PHP
Edit /etc/php.ini
You can change some values:
; Maximum size of POST data that PHP will accept. ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size post_max_size = 8M ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit memory_limit = 128M ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 2M
Restart PHP-fpm service
Related
How to fix error: “413 Request Entity Too Large” when upload files
ExpressJS: How to fix error: 413 (Payload Too Large)
2 Comments
How to fix error: “413 Request Entity Too Large” when upload files | Free Online Tutorials
(September 23, 2021 - 5:11 am)[…] Nginx: how to fix error 413 Request Entity Too Large ExpressJS: How to fix error: 413 (Payload Too […]
ExpressJS: How to fix error: 413 (Payload Too Large) | Free Online Tutorials
(December 19, 2021 - 10:09 am)[…] Related How to fix error: “413 Request Entity Too Large” when upload files Nginx: how to fix error 413 Request Entity Too Large […]