nginx阻挡flv视频文件上传解决方案
问题:nginx阻挡flv上传
上传flv视遇到出现IO 错误,尝试使用ip直接访问页面上传,可以成功
解决方法: 一. 重新编译nginx,添加upload模块
- 拷贝 nginx-upload-module-master
- ./configure --add-module=/www/nginx-1.8.0/nginx-upload-module-master --add-module=/www/nginx-1.8.0/nginx_ajp_module-master/ --with-pcre=/www/nginx-1.8.0/pcre-8.33 --with-zlib=/www/nginx-1.8.0/zlib-1.2.8 --with-http_sub_module
- Make
- Make install
二. 修改nginx.conf:
upload_pass /web/Resource/jsp/fileUp.jsp?allowType=.flv&fileTypes=.flv&path=_netpat_temp; upload_cleanup 400 404 499 500-505; upload_store /usr/local/platform/file/upload/ 1; upload_store_access user:r; upload_limit_rate 128k; upload_pass_args on;
Q: client intended to send too large body: 12061790 bytes, A: 打开nginx.conf并在http{}字段里添加 client_max_body_size 64M; #多少M根据实际情况填写