For business purposes, you need to upload music. Nginx has a limit on uploading, which should be no more than 2 mb. Therefore, you need to reconfigure it.
First, Configure nginx. Find the nginx. conf configuration file and modify the php module in http. The complete code is as follows:
# Pass the PHP scripts to FastCGI server listening on Fig: 9000
#
Location ~ . Php $ {
Root/var/www/html/webroot;
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME/home/www/htdocs $ fastcgi_script_name;
Include fastcgi_params;
Client_max_body_size 35 m; # set the size of the uploaded file on the client to 35 M.
Client_body_temp_path/var/www/html/nginx_temp; # set a temporary directory
}
Tip:
Client_max_body_size 35 m; # set the size of the uploaded file on the client to 35 M.
Client_body_temp_path/var/www/nginx_temp; # set a temporary directory
Second, because nginx and php need to be connected using fpm, and php itself has restrictions on uploading in php. ini, you need to modify the php. ini code as follows:
Upload_max_filesize = 8 M
Post_max_size = 10 M
Memory_limit = 20 M
Max_execution_time= 300
File_uploads = On
After the above two steps are completed, we need to restart php-fpm. If it is not restarted, php. ini will not be reloaded.
Find php-fpm and execute the following command in the command line:
/Etc/rc. d/init. d/php-fpm restart
Restart nginx again.
Kill the nginx process and run nginx to start it.