Created
August 14, 2018 14:35
-
-
Save derozic/d636dd8f18ad675b6433d7193fb2b704 to your computer and use it in GitHub Desktop.
Increase file upload size PHP/nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e.g. To change max file upload size to 100MB | |
Edit… | |
`sudo vi /etc/php5/fpm/php.ini` | |
Set… | |
`upload_max_filesize = 100M | |
post_max_size = 100M` | |
Also add following line to http{..} block in nginx config: | |
`http { | |
#... | |
client_max_body_size 100m; | |
#... | |
}` | |
Make sure you didn't break nginx config: | |
`sudo nginx -t` | |
Restart system services: | |
`sudo service php7.2-fpm restart` | |
`sudo systemctl restart nginx` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment