Increase File Upload Size in PHP-Nginx

Increase File Upload Size in PHP-Nginx

nginx

How to fix “[error] client intended to send too large body” in Ubuntu

Edit php.ini:

vi /etc/php5/fpm/php.ini

 

Set:

upload_max_filesize = 10M
post_max_size = 12M

 

Then change Nginx config file:

vi /etc/nginx/nginx.conf

 

Set:

http {
#...
client_max_body_size 10M;
#...
}

 

Restart PHP-FPM and Nginx Srvices:

service php5-fpm restart
service nginx restart

 

arstech

Leave a Reply