解決nginx報(bào)錯(cuò)信息 client intended to send too large body: 1331696 bytes
解決nginx報(bào)錯(cuò)信息 client intended to send too large body: 1331696 bytes
1,nginx后臺(tái)error日志報(bào)錯(cuò)
2016/02/05 16:23:56 [error] 12024#0: *441106971 connect() failed (111: Connection refused) while connecting to upstream, client: 113.214.1.10, server: localhost, request: "GET /h5teb/ugcH5/index.htm?source=android&mall=8&TGC=911FDD2F99B84D528F0A7EE71780A943 HTTP/1.1", upstream: "http://113.214.1.23:8000/h5teb /ugcH5/index.htm?source=android&mall=8&TGC=911FDD2F99B84D528F0A7EE71780A943", host: "www.testcrm.com" 2016/02/05 16:48:14 [error] 12013#0: *441119082 client intended to send too large body: 1331696 bytes, client: 113.214.1.10, server: localhost, request: "POST /h5teb/complaints/save.htm HTTP/1.1", host: "www.testcrm.com", referrer: "http://www.testcrm.com/h5teb/complaints/index.htm"
2,web工程中添加對文件上傳的限制
web工程部署了一個(gè)單獨(dú)的nginx,在http{后面添加限制100m的上限
client_max_body_size 100m; [nginx@wgq_idc_web_1_21 logs]$ vim /usr/local/nginx/conf/nginx.conf http { include mime.types; server_tokens off; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; log_format main '$proxy_add_x_forwarded_for $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' 'upstream: $upstream_addr'; access_log off; client_max_body_size 100m;
3,靜態(tài)資源中添加對文件上傳的限制
靜態(tài)資源部署了一個(gè)單獨(dú)的nginx,在轉(zhuǎn)發(fā)location中進(jìn)行配置100m的上限,client_max_body_size 100m;:
[fastdfs@wgq_test_crm~]$ vim /usr/local/nginx/conf/nginx.conf location /group1/M00 { root /data/fastdfs/data; include gzip.conf; ngx_fastdfs_module; client_max_body_size 100m; expires 12h; } location /group2/M00 { root /data/fastdfs_group2/data; ngx_fastdfs_module; client_max_body_size 100m; #access_log /usr/local/nginx/logs/group2_pic.log main; expires 12h; include gzip.conf; }
4,然后重新加載2組nginx服務(wù)器,問題解決了,不會(huì)再報(bào)錯(cuò)了。
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
- go語言中int和byte轉(zhuǎn)換方式
- IntelliJ IDEA引入第三方j(luò)ar包或查看Java源碼的時(shí)候報(bào)decompiled.class file bytecode version:52.0(java 8)錯(cuò)誤的解決辦法
- Java中byte、byte數(shù)組與int、long的轉(zhuǎn)換詳解
- Java 字節(jié)數(shù)組類型(byte[])與int類型互轉(zhuǎn)方法
- 在Java中int和byte[]的相互轉(zhuǎn)換
- java byte數(shù)組與int,long,short,byte的轉(zhuǎn)換實(shí)現(xiàn)方法
- java int轉(zhuǎn)byte和long轉(zhuǎn)byte的方法
- 基于java中byte數(shù)組與int類型的轉(zhuǎn)換(兩種方法)
- Java利用移位運(yùn)算將int型分解成四個(gè)byte型的方法
相關(guān)文章
解決nginx啟動(dòng)失敗(bind()?to?0.0.0.0:80?failed,An?attempt?was?
這篇文章主要介紹了解決nginx啟動(dòng)失敗問題(bind()?to?0.0.0.0:80?failed,An?attempt?was?made?to?access?a?socket?in?...),具有很好的參考價(jià)值,希望對大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2024-05-05Nginx配置參數(shù)中文說明詳解(負(fù)載均衡與反向代理)
最近在看高性能Linux服務(wù)器構(gòu)建實(shí)戰(zhàn)的Nginx章節(jié),對其nginx介紹的非常詳細(xì),現(xiàn)把經(jīng)常用到的Nginx配置參數(shù)中文說明摘錄和nginx做負(fù)載均衡的本人真實(shí)演示實(shí)例抄錄下來以便以后查看2020-03-03分析nginx日志并屏蔽采集者ip(nginx屏蔽ip配置實(shí)例)
這篇文章主要介紹了分析nginx日志并屏蔽采集者ip(nginx屏蔽ip配置實(shí)例),本文先是講解了分析需要屏蔽日志的方法,然后講解了Nginx中屏蔽IP的配置方法,需要的朋友可以參考下2015-02-02nginx 如何實(shí)現(xiàn)if嵌套的方法示例
這篇文章主要介紹了nginx 如何實(shí)現(xiàn)if嵌套的方法示例,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-11-11