根據(jù)官方文檔說(shuō)明,可以在nginx配置文件中http、server、location等配置塊添加配置,client_max_body_size size;來(lái)調(diào)整允許的客戶(hù)端上傳文件的body大小。設(shè)置為0,表示不限制。
(推薦教程:nginx使用教程)
nginx默認(rèn)的客戶(hù)端body大小為1M。
具體配置如下:
http?{ ????log_format??main??'$remote_addr?-?$remote_user?[$time_local]?"$request"?' ??????????????????????'$status?$body_bytes_sent?"$http_referer"?' ??????????????????????'"$http_user_agent"?"$http_x_forwarded_for"'; ????access_log??/var/log/nginx/access.log??main; ????sendfile????????????on; ????tcp_nopush??????????on; ????tcp_nodelay?????????on; ????keepalive_timeout???65; ????types_hash_max_size?2048; ????client_max_body_size?100m; .... }
? 版權(quán)聲明
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載。
THE END
喜歡就支持一下吧
相關(guān)推薦