您的位置:首页 > 运维架构 > Nginx

Nginx+Weblogic集群及session共享复制(生产案例) 推荐

2016-08-11 00:10 543 查看
生产环境:

系统: Redhat_6.6.x86_64
负载反向代理工具: Nginx-1.8.1
Session工具: nginx-upstream-jvm-route-0.2.tar.gz
nginx-upstream-jvm-route下载地址:https://code.google.com/archive/p/nginx-upstream-jvm-route/downloads

1、nginx-upstream-jvm-route安装
假设nginx_upstream_jvm_route下载后的路径为/usr/local/nginx_upstream_jvm_route
(1)进入nginx源码路径# patch -p0 < /usr/local/nginx_upstream_jvm_route/jvm_route.patch(2)配置系统编译安装环境# ./configure --with-http_stub_status_module --with-http_ssl_module --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre-8.33 --add-module=/usr/local/nginx_upstream_jvm_route(3)编译安装# make & make install2、配置Nginx_upstream及session黏粘




做好以上配置还不行,如果所使用的当前节点宕机后,再次在前端web页面上做任何操作时,包括刷新、点击,浏览时,会让你重新登录的;go on!!!!!!
3、Session复制
应用中添加weblogic.xml
<?xml version="1.0" encoding="GBK"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
<sharing-enabled>true</sharing-enabled>
</session-descriptor>

</weblogic-web-app>
保存退出,并重启Weblogic的所有web节点服务,再次测试,完美解决Session共享复制!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Weblogic 集群 Nginx