在公司内部搭建内部视频学习网站,经过对比选择了wordpress进行站点搭建。但是在上传视频遭遇到了各种问题,特将此处理过程进行记录。
vim /etc/nginx/conf.d/default.conf location / { root /data/web; index index.php index.html index.htm; client_max_body_size 000M; } vim /etc/php.ini upload_max_filesize = 000M post_max_size = 000M max_execution_time = 300
tail /var/log/nginx/error.log 2018/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"
只有下面这一行是最主要的保存信息。以下错误就是body限制大小的问题
client intended to send too large body
vim /etc/nginx/nginx.conf http{ client_max_body_size 1000M; keepalive_timeout 300; }
以上是如何处理WordPress上传资源报HTTP错误的详细内容。更多信息请关注PHP中文网其他相关文章!