[PHP] file upload size limit for Nginx and PHP,
----------------------------------------------------------------------- @ Black Eye poet www. chenwei. ws
1. Modify three items in the PHP configuration file: vim/usr/local/php/etc/php. ini
(1) post_max_size = 50 M # maximum POST data acceptable to PHP
(2) upload_max_filesize = 50 M # maximum value allowed for File Upload
(3) max_execution_time = 300 # maximum execution time of each script, in seconds (0 is not limited, it is not recommended to set 0)
2. Modify the Nginx configuration file vim/usr/local/nginx/conf/nginx. conf. (If you forget the specific location of the configuration file, you can use locate nginx. conf to find it)
(1) client_max_body_size 50 m # maximum client upload size 50 M
3. restart PHP:/etc/init. d/php-fpm restart
4. Restart Nginx smoothly:/usr/local/nginx/sbin/nginx-s reload
Bytes ----------------------------------------------------------------------------------------------------