ITPub博客

首页 > IT基础架构 > 网络安全 > nginx

nginx

原创 网络安全 作者:netwant 时间:2011-06-24 16:38:57 0 删除 编辑
nginx tomcat 负载均衡[@more@]

http://code.google.com/p/nginx-upstream-jvm-route/source/browse/trunk/jvm_route.patch?r=7

下载jvm_route.patch 代码。

安装:http://code.google.com/p/nginx-upstream-jvm-route/

然后把代码写到/path/to/this/directory/jvm_route.patch文件里。然后执行以下命令:

cd nginx-0.7.59 # or whatever
patch
-p0 < /path/to/this/directory/jvm_route.patch
./configure 
--add-module=/path/to/this/directory --with-http_stub_status_module –prefix=/usr/local/nginx

Nginx's configure

upstream backend {
server
192.168.0.100 srun_id=a;
server
192.168.0.101 srun_id=b;

jvm_route $cookie_JSESSIONID reverse
;}

Tomcat's configure

Tomcat a:

name="Catalina" defaultHost="localhost" jvmRoute="a">

Tomcat b:

name="Catalina" defaultHost="localhost" jvmRoute="b">

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/309902/viewspace-1051574/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: linux ntpd
请登录后发表评论 登录
全部评论

注册时间:2010-11-17

  • 博文量
    61
  • 访问量
    180998