nginx配置http为1.0到1.1,主要是为了长连接有效

来源:互联网 发布:龙卷风软件下载 编辑:程序博客网 时间:2024/05/01 07:40

引用 http://nginx.org/cn/docs/http/ngx_http_upstream_module.html#keepalive

对于HTTP代理,proxy_http_version指令应该设置为“1.1”,同时“Connection”头的值也应被清空。

upstream http_backend {    server 127.0.0.1:8080;    keepalive 16;}server {    ...    location /http/ {        proxy_pass http://http_backend;        proxy_http_version 1.1;        proxy_set_header Connection "";        ...    }}
0 0
原创粉丝点击