nginx+tomcat文件上传配置

2016-08-13


Nginx配置文件中请求大小阀值:client_max_body_size

location /app {
    proxy_pass             http:  //server_name;
    client_max_body_size   3000m;
    access_log             off;
}

 

Tomcat中设置上传文件大小及上传时间阀值

上传文件大小阀值:在server.xml中的connector元素中添加:maxPostSize=”0” ,缺省参数2m,0 无限制

连接时间阀值: 在server.xml中的connector元素中添加:connectonTimeout="180000",单位毫秒

 1 <Connector port="808" 
 2            protocol="HTTP/1.1" 
 3            connectionTimeout="2000000" 
 4            redirectPort="8028" 
 5            URIEncoding="UTF-8"
 6            maxThreads="1000"
 7            maxPostSize="0"
 8            minSpareThreads="25" 
 9            maxSpareThreads="75" 
10            acceptCount="200" />

 


posted @ 2016-08-13 10:33  lxm-沐雨  阅读(2984)  评论(0编辑  收藏  举报