首页 > 其他 > 详细

tengine-sticky

时间:2020-07-30 21:14:23      阅读:71      评论:0      收藏:0      [点我收藏+]
#添加sticky模块
./configure --prefix=/data/tengine --with-http_stub_status_module --with-http_ssl_module --add-module=modules/ngx_http_upstream_session_sticky_module

#官方链接
http://tengine.taobao.org/
http://tengine.taobao.org/document_cn/http_upstream_session_sticky_cn.html

#upstream设置
upstream app {
        session_sticky;
        server 11.83.2.16:80;
        server 11.83.2.17:80;
}

server {
        listen       443;
        server_name  x.x;

        location / {
            proxy_pass http://app;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host:1443;
        }
        location /status {
	    stub_status on;
	    access_log off;
            allow 127.0.0.1;
            deny all;
	}
} 

tengine-sticky

原文:https://www.cnblogs.com/kylingx/p/13405939.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!