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.org download 2 Apache to D: Apache GroupApache2 Tomcat to E: workjakarta-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: in Apache GroupApache2modules, copy conf/workers2.properties. sample to D: Apache GroupApache2conf, And renamed worker1.properties. 3. Modify D: Apache GroupApache2confhttpd. 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.
|