nginx 长连接
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx 长连接相关的知识,希望对你有一定的参考价值。
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
<Connector port="18001" protocol="HTTP/1.1"
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" />
本文出自 “智能化未来_XFICC” 博客,请务必保留此出处http://xficc.blog.51cto.com/1189288/1878944
以上是关于nginx 长连接的主要内容,如果未能解决你的问题,请参考以下文章