The following configuration is done under redhat6.4
PHP Upload file size limit:
1, first find PHP in use of the configuration file
# Php–ini
Output: Loaded configureration file:/usr/loca/php/etc/php.ini
2, edit php.ini
#vim/usr/loca/php/etc/php.ini
3, modify the Upload_max_filesize 10M #默认值是2M
Save, Exit Vim
4, note: toRestart the PHP-FPM, many people said that the change does not take effect is the case.
#service php-fpm Restart
Nginx Upload File size limit
1. Locate the Nginx configuration file and execute the following command in the Sbin directory of the Nginx installation directory
#./nginx-t
Will show the configuration file is correct, in fact we only look at the file location on the line
2, modify nginx.conf
#vim/usr/local/nginx/conf/nginx.conf
3, add the following line to the HTTP segment
Client_max_body_size 10M;
4, restart Nginx
Service Nginx Restart
Finish, and finish the call.
PHP and nginx default upload file size limit solution