upstream appserver {
server 127.0.0.1:18001;
keepalive 64;
}
server {
listen 8888;
server_name localhost;
access_log /data/logs/access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass http://appserver;
proxy_set_header x-forwarded-for $remote_addr;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
tomcat中修改
server.xml
connectionTimeout="2000000000000"
acceptCount="1024"
minProcessors="10"
maxProcessors="1024"
maxThreads="1000"
enableLookups="false"
maxPostSize="0"
URIEncoding="UTF-8"
redirectPort="8443"
compression="on"
keepAliveTimeout="60000"
maxKeepAliveRequests="1000000"
compressableMimeType="text/html,text/xml" />