Created
August 30, 2012 03:08
-
-
Save junlapong/3521943 to your computer and use it in GitHub Desktop.
Apache/Tomcat Load Balance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LoadModule jk_module modules/mod_jk.so | |
| JkWorkersFile conf/custom/workers.properties | |
| JkMountFile conf/custom/uriworkermap.properties | |
| # AUTO RELOAD uriworkermap.properties | |
| JkMountFileReload 0 | |
| JkLogFile "logs/mod_jk.log" | |
| JkLogLevel warn | |
| #JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " | |
| #JkRequestLogFormat "%w %V %T" | |
| #JkMount /jkmanager/* jkstatus | |
| # Enable the JK manager access from localhost only | |
| <Location /jkmanager> | |
| JkMount jkstatus | |
| Order deny,allow | |
| Deny from all | |
| Allow from 127.0.0.1 | |
| </Location> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # URI Map to worker catalina (8080) | |
| /batch=catalina | |
| /batch/*=catalina | |
| /cluster=balancer | |
| /cluster/*=balancer | |
| /bay|/*=balancer;use_server_errors=400 | |
| # 400, 500 | |
| # URI Map to worker node1 (8180) | |
| #/manager/status*=node1 | |
| ## Exclude the all subdirectories static for all workers: | |
| # !/*/static|/*=* | |
| ## Exclude some suffixes for all workers: | |
| # !*.js=* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##### REFERENCE ##### | |
| # http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html | |
| # http://tomcat.apache.org/connectors-doc/generic_howto/workers.html | |
| # macro | |
| # mynet=194.168.1 | |
| # worker.node1.host=$(mynet).11 => 194.168.1.11 | |
| #workers.tomcat_home=D:\d-report\server\tomcat | |
| #workers.java_home=D:\d-report\java\jre6 | |
| #ps=/ | |
| worker.list=jkstatus,catalina,balancer | |
| worker.jkstatus.type=status | |
| worker.jkstatus.css=/admin/css/status.css | |
| worker.catalina.host=localhost | |
| worker.catalina.port=8009 | |
| worker.catalina.type=ajp13 | |
| #worker.catalina.activation=false | |
| worker.balancer.type=lb | |
| worker.balancer.balance_workers=node1,node2,node3 | |
| worker.balancer.sticky_session=1 | |
| worker.node1.host=localhost | |
| worker.node1.port=8109 | |
| worker.node1.type=ajp13 | |
| worker.node1.lbfactor=1 | |
| #worker.node1.activation=false | |
| #worker.node1.redirect=node2 | |
| worker.node2.host=localhost | |
| worker.node2.port=8209 | |
| worker.node2.type=ajp13 | |
| worker.node2.lbfactor=1 | |
| #worker.node1.activation=false | |
| #worker.node2.redirect=node3 | |
| worker.node3.host=localhost | |
| worker.node3.port=8309 | |
| worker.node3.type=ajp13 | |
| worker.node3.lbfactor=1 | |
| #worker.node1.activation=false | |
| #worker.node3.redirect=node1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment