Categories
blog Nginx

Increase file upload size limit in PHP-Nginx

Changes in php.ini

To change max file upload size to 100MB

Edit…

vim /etc/php5/fpm/php.ini

Set…

upload_max_filesize = 100M
post_max_size = 100M

Change in Nginx config

Add following line to http{..} block in nginx config: /etc/nginx/nginx.conf

http {
	#...
        client_max_body_size 100m;
	#...
}

Reload PHP-FPM & Nginx

service php5-fpm reload
service nginx reload