yb31 发表于 2013-2-5 00:21:18

apache+resin config Load Balancing

window下
1.下载安装apache2.2+resin-3.1.1
2.配置apache(下面resin-3.1.1开头的为resin安装路径.Apache2.2开头的为apahce安装目录)
把resin-3.1.1\win32\apache-2.2\mod_caucho.dll复制到Apache2.2\modules目录下
修改Apache2.2\conf\httpd.conf
增加行
LoadModule caucho_module modules/mod_caucho.dll  #用resin带的setup.exe是写绝对路径如D:/xxx/mod_caucho.dll发现不行.
<ifmodule mod_caucho.c=""></ifmodule>
  ResinConfigServer 192.168.0.124 6800
  CauchoStatus yes

3.配置resin(3.1以前的配置差比较多)
A:(a为cluster配置服务器)
    <server id="a" address="192.168.0.124" port="6800"></server>
    <server id="b" address="192.168.0.124" port="6801"></server>
B:(同一台机子,所以修改默认端口6801.http为:8081
    <server id="b" address="192.168.0.124" port="6801"></server>
4.启动resin
因为配置了server id 所以,不能直接执行httpd.exe.用命令行
cd 到a的安装目录
httpd.exe -server a start             //停止为stop
cd 到b的安装目录
httpd.exe -server b start
5.启动apahe
6.请求http://localhost/caucho-status查看启动状态
---------------------------------------------------------------------
请求http://localhost/index.jsp并打出sessionid.
发现可以实现粘性session.
但不知道为什么b机.的session一直为aXXXXXX即a开头.接下来再请求就跑到a机去了..
有别的事忙,过两天再看看..-_-!!!
--------------------------------------------------------------------
 
页: [1]
查看完整版本: apache+resin config Load Balancing