Briefly
Inside the company to build internal video learning site, after a comparison of selected WordPress site construction. However, in the upload video encountered a variety of problems, the process is recorded.
Cause troubleshooting
1. Upload a more than 10 MB MP4 file upload progress to 100%, the media will prompt HTTP error
2. Initially suspected PHP, nginx upload size limit. However, the view PHP, Nginx configuration is configured with 1000M
vim /etc/nginx/conf.d/default.conflocation / { root /data/web; index index.php index.html index.htm; client_max_body_size 1000M;}vim /etc/php.ini upload_max_filesize = 1000M post_max_size = 1000M max_execution_time = 300
3. View Nginx Erro Log
tail /var/log/nginx/error.log2018/02/14 09:32:07 [error] 87522#87522: *1 client intended to send too large body: 35016434 bytes, client: 36.111.88.33, server: localhost, request: "POST /wp-admin/async-upload.php HTTP/1.1", host: "117.66.240.116:81", referrer: "http://117.66.240.116:81/wp-admin/media-new.php"
Only the following line is the most important saving information. The following error is the body limit size problem
client intended to send too large body
4. Set the limit size in HTTP after the last string of resources will not be in a limited
vim /etc/nginx/nginx.confhttp{ client_max_body_size 1000M;keepalive_timeout 300;}
WordPress Upload Resource Report HTTP Error