Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tengine session persistence feature

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Modify the nginx.conf configuration file upstream nginx {# to add the following configuration: session_sticky cookie=uid fallback=on path=/ mode=insert option=indirect; server 192.168.2.140 session_sticky cookie=uid fallback=on path=/ mode=insert option=indirect; server 8080; server 192.168.2.136 session_sticky cookie=uid fallback=on path=/ mode=insert option=indirect; server 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 / {# add the following configuration 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;}

two。 Restart nginx

3. Reference http://tengine.taobao.org/document_cn/http_upstream_session_sticky_cn.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report