Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Goldoni's avatar

Error: 413 Payload Too Large on nginx and php7.2-fpm

I need help please, I have a 413 Payload Too Large error of the server when I want to upload a zip file of more than 10M. I modified my nginx.conf by adding client_max_body_size 100M and my php. ini upload_max_filesize = 50M and post_max_size = 50M then restart the two services. But I still have the error 413 Payload Too Large.

0 likes
2 replies
ejdelmonico's avatar
Level 53

@Goldoni Are you definitely sure you edited the correct php config file? You say you are using PHP-FPM which has its own config file. Depending on server OS and provisioning, you can usually find them at /etc/php-fpm.conf file and /etc/php-fpm.d paths.

Goldoni's avatar

Thank you I had edit the wrong php configuration file( /etc/php/7.2/cli/php.ini)

Please or to participate in this conversation.