Apache JBoss3.0.7 Tomcat4.1.x (for Win2000 PRO) configuration
One. installation
Condition: (All software versions are critical, please replace other versions in the installation of the version)
Apache: apache_2.0.48-win32-x86-no_ssl.msi (http://apache.linuxforum.net/dist/httpd/binaries/win32/apache_2.0.48-win32- x86-no_ssl.msi)
JBoss: jboss-3.0.7_jakarta-tomcat-4.1.24 (both integrated version, online finding, there will be)
MOD_JK: MOD_JK_1.2.5_2.0.47.dll (http://apache.linuxForum.Net/dist/jakarta/tomcat-connectors/jk/binaries/win32/mod_jk_1.2.5_2.0.47.dll)
two. Configuring apache and mod_jk
Copy mod_jk_1.2.5_2.0.47.dll file to apache_install_dir / modules
Edit Apache_install_dir / conf / httpd.conf file, join in the last line
# ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LoadModule JK_Module Modules / MOD_JK_1.2.5_2.0.47.dll
JKWorkersfile "C: /apore2/conf/Workers.properties"
Jklogfile "c: /apache2/logs/jk.log"
Jkloglevel Normal
JKMount /*.jsp LB
Ifmodule>
# ---------------------------------------------
My Apache is installed in a C: / Apache2 directory
Pay attention to jkmount /*.jsp lb, if you write to jkmount / * lb, transfer all the files directly to the JBoss publishing directory to search, we set up the JSP file only, other files or DocumentRoot paths to Apachel configuration Looking in, so I have to set up DocumentRoot, which is to use the Apache's Alias alias function.
Find the DocumentRoot "C: / Apache2 / HTDOCS" line, change it to:
Documentroot "C: /JBoss-3.0.7_jakarta-tomcat-4.1.24/server/all/Deploy/mms.war"
If you want to use servlet, you can add jkmount / servlets / * lb, of course, the URL of servlet in Web.xml is changed to
servlet>
servlet-maping>
Enter http://192.168.0.28/servlets/myservlet in IE, you can execute consoleServlet. Configure the workers.properties file
Edit the following to save the workers.properties file, in the c: / apache2 / conf directory
# ------------------------------------------------- -
# Tell MOD_JK To Use the load balancer
Worker.list = lb
# Define the worker1
Worker.Worker1.Type = ajp13
Worker.Worker1.host = 192.168.0.28
Worker.Worker1.port = 8009
Worker.Worker1.lbFactor = 1
# Define the worker2
Worker.Worker2.Type = ajp13
Worker.Worker2.host = 192.168.0.28
Worker.Worker2.port = 8009
Worker.Worker2.lbFactor = 1
# Define the loading balancer
Worker.lb.type = lb
Worker.lb.balanced_Workers = Worker1, Worker2
# -----------------------------------------------
192.168.0.28 is the address for my computer IP, of course, JBoss is also on this machine.
.................... ..
Four. Set the Tomcat41-Service.xml file of JBoss
At C: /JBOSS-3.0.7_JAKARTA-TOMCAT-4.1.24/server/all/Deploy directory, of course you have default
Comment the original Connector and add a new Connector, change to the following content (including annotated)
Port = "80" minprocessors = "5" MaxProcessors = "75"
Enablelookups = "True" redirectport = "8443"
AcceptCount = "100" debug = "0" connectionTIMEOUT = "- 1"
Useurivalidationhack = "false" disableuploadtimeout = "true" / ->
Port = "8009" MINPROCESSORS = "5" maxprocessors = "75"
Enablelookups = "True" redirectport = "8443"
Acceptcount = "10" debug = "0" connectionTIMEOUT = "20000"
Useurivalidationhack = "false"
protocolhandlerclassname = "org.apache.jk.server.jkcoyotehandler" / ->
Port = "8080" MINPROCESSORS = "3" maxprocessors = "10" enablelookups = "True" Acceptcount = "10" debug = "0" connectionTIMEOUT = "60000" /> Port = "8009" MINPROCESSORS = "5" maxprocessors = "75" Acceptcount = "10" /> Port 8080 can be changed to other ports, but cannot be changed to 80, because Apache is being used, 8090 port modification is consistent with Workers.Properties. Fives. Great success Restart Apache Start JBoss_Tomat (C: /JBoss-3.0.7_jakarta-tomcat-4.1.24/bin/run -c all) / bin / run -c all) Enter http: // localhost or http: // localhost / jmx-console / normal display in IE, all OK Sixth, alias configuration Find the following line Aliasmatch ^ / manual (?: / (?: de | EN | fr | ja | ko | ru))? (/.*)? $ "C: / apache2 / mang $ 1" Options indexes ALLOWOVERRIDE NONE ORDER ALOW, DENY ALLOW FROM ALL SetHandler Type-Map Files> SetENVIF Request_uri ^ / Manual / de / prefer-language = de SetENVIF Request_uri ^ / Manual / En / Prefer-Language = EN SetENVIF Request_uri ^ / Manual / fr / prefer-language = fr SetENVIF Request_uri ^ / Manual / Ja / Prefer-Language = JA Stenvif request_uri ^ / manual / ko / prefer-language = kosetenvif request_uri ^ / manual / ru / prefer-language = ru RedirectMatch 301 ^ / Manual (?: / (De | EN | fr | ja | ko | ru)) {2,} (/. (/. $ / Manual / $ 1 $ 2 Directory> At the end of it Alias / MIG / "D: / TEMP /" Options Indexes Followsymlinks MultiViews ALLOWOVERRIDE NONE ORDER ALOW, DENY ALLOW FROM ALL Directory> This way you can access by http://192.168.0.28/mig/, if there is index.html file in the D: / Temp directory, you can display it directly.