sudo nano /etc/nginx/nginx.conf
Then add a line in the http section
http {
client_max_body_size 100M;
}
don't use MB only M.
systemctl restart nginx
then for php location
sudo gedit /etc/php5/fpm/php.ini
for nowdays maximum use php 7.0 or higher
sudo nano /etc/php/7.2/fpm/php.ini //7.3,7.2 or 7.1 which php you use
check those increasing by your desire .
memory_limit = 128M
post_max_size = 20M
upload_max_filesize = 10M
restart php-fpm
service php-fpm restart