RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
tengine会话保持功能

1.修改nginx.conf配置文件

 upstream nginx {
        #添加如下配置
        session_sticky cookie=uid fallback=on path=/ mode=insert option=indirect
;
        server 192.168.2.140:8080;
        server 192.168.2.136:8080;
        check interval=3000 rise=2 fall=5 timeout=1000 type=http;
        check_http_send "HEAD / HTTP/1.0\r\n\r\n";
        check_http_expect_alive http_2xx http_3xx;
 }
 
 
 
  location / {
          #添加如下配置
            session_sticky_hide_cookie upstream=nginx;
            proxy_pass http://nginx;
            auth_basic off;
            auth_basic_user_file /var/user;
            root   html;
            index  index.html index.htm;
        }

目前创新互联建站已为数千家的企业提供了网站建设、域名、网站空间网站运营、企业网站设计、安宁网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

2.重新启动nginx

3.参考http://tengine.taobao.org/document_cn/http_upstream_session_sticky_cn.html


网页名称:tengine会话保持功能
网站地址:http://scyingshan.cn/article/ppjjos.html