2、es下已经有mod_jk-1.2.25-httpd-2.2.4.so文件。(2)、修改%apache%confhttpd.conf在文件末尾添加:Includeconf/mod_jk2.conf(3)、在%apache%conf下新建文件mod_jk2.conf文件内容如下:1.# Load mod_jk module. Specify the filename 2.# of the mod_jk lib you've downloaded and 3.# installed in the previous section 4.LoadModule
3、jk_module modules/mod_jk-1.2.25-httpd-2.2.4.so 5.# Where to find workers.properties 6.JkWorkersFile conf/workers2.properties 7.# Where to put jk logs 8.JkLogFile logs/mod_jk.log 9.# Set the jk log level [debug/error/info] 10.JkLogLevel info 11.# Select the log format 12.JkLogStamp
4、Format "[%a %b %d %H:%M:%S %Y] " 13.# JkOptions indicate to send SSL KEY SIZE, 14.JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories 15.# JkRequestLogFormat set the request format 16.JkRequestLogFormat "%w %V %T" 17.JkMount /* loadbalancer 其中JkMount/*loadbalancer的意思是,
5、把所有的请求都发给loadbalancer处理。可以通过修改url来控制发送某些request。(4)、在%apache%conf下新建文件workers2.properties其内容为:worker.list=loadbalancer,server1,server21.# Define the first node... 2.worker.server1.port=8009 3.worker.server1.host=192.168.0.1 4.worker.server1.type=ajp13 5.worker.server1.lbfactor=1
6、6.worker.server1.local_worker=1 7.worker.server1.cachesize=10 8. 9.# Define the first node... 10.worker.server2.port=8009 11.worker.server2.host=192.168.0.2 12.worker.server2.type=ajp13 13.worker.server2.lbfactor=1 14.worker.server2.local_worker=1 15.worker.server2.cachesize=10 16
7、. 17.# Now we define the load-balancing behaviour 18.worker.loadbalancer.type=lb 19.worker.loadbalancer.balance_workers=server1,server2 20.worker.loadbalancer.sticky_session=1 其中对于node的命名规则是worker.节点名.xxxx。所以上述文件定义了两个节点:server1和server2。8009端口是jboss默认的ajp端口,另外需要注意的是worker.server2.l