The Connection Methods for Apache and tomcat are jk1.x, JK2, and mod_webapp.
Apache2.0.50 + atat5.0.29 + mod_jk2 connection method. The environment is Windows XP
1. Download:
Apache2.0.50 download from http://apache.org
Tomcat5.0.28 from http://jakarta.apache.org download
Module_jk2 from http ://Jakarta.apache.orgDownload
2. Installation
Apache to D:/Apache Group/apache2
Tomcat to E:/work/jakarta-tomcat-5.0.28
The lefile is jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip, And the modules/mod_jk2.so file is copied
D:/Apache Group/apache2/modules, and copy CONF/workers2.properties. Sample to D:/Apache Group/apache2/CONF,
And renamed worker1.properties.
3. Modify D:/Apache Group/apache2/CONF/httpd. conf and add
Loadmodule jk2_module "modules/mod_jk2.so"
Jkset config. File "CONF/workers2.properties"
After Apache configuration is complete, restart Apache
4. Tomcat supports JK2 connection of ajp1.3 by default, so you only need to configure Apache. The rest is to add the directory to be accessed
Worker2.properties. The default value is
[SHM]
Info = scoreboard. requried for reconfiguration and status with Multiprocess servers.
File = Anon
# Defines a Load balancer named lb. Use even if you only have one machine.
[LB: LB]
# Example socket channel, override port and host.
[Channel. Socket: localhost: 8009]
Port = 8009
Host = 127.0.0.1
# Define the worker
[Ajp13: localhost: 8009]
Channel = channel. Socket: localhost: 8009
Group = LB
# Map the Tomcat examples webapp to the Web server URI Space
[URI:/examples/*]
Group = LB
[Status:]
Info = status worker, displays runtime information
[URI:/jkstatus/*]
Info = the tomcat/jkstatus Handler
Group = status:
[SHM]
Info = scoreboard. requried for reconfiguration and status with Multiprocess servers.
File = D:/Apache Group/apache2/logs/jk2.shm
Size = 1048576
You need to modify the default directory of Apache. Then I added two directories/Servlets-examples and/axis.
# Defines a Load balancer named lb. Use even if you only have one machine.
[LB: LB]
# Example socket channel, override port and host.
[Channel. Socket: localhost: 8009]
Port = 8009
Host = localhost
# Define the worker
[Ajp13: localhost: 8009]
Channel = channel. Socket: localhost: 8009
Group = LB
# Map the Tomcat examples webapp to the Web server URI Space
[URI:/JSP-examples/*]
Group = LB
[URI:/BBS/*]
Group = LB
[URI:/Servlets-examples/*]
Group = LB
[URI:/axis/*]
Group = LB
[Status:]
Info = status worker, displays runtime information
[URI:/jkstatus/*]
Info = the tomcat/jkstatus Handler
Group = status:
[URI:/*. jsp]
Worker = ajp13: localhost: 8009
Restart Apache and tomcat
Access
Http: // localhost/jkstatus/
Http: // localhost/Servlets-examples/
Http: // localhost/axis/
Http: // localhost: 8080/Servlets-examples/
Http: // localhost: 8080/axis
Take a look at the results. If you want to add a new directory, you just need to follow the operation above.