Tomcat and Apache use MOD

xiaoxiao2021-03-06  40

Apache and Tomcat connections are roughly jk1.x, jk2, mod_webapp three connectors can be used, the connection method of apache2.0.50 tomcat5.0.29 mod_jk2, the environment is Windows XP1, download: Apache2.0.50 from HTTP : //apache.org Download Tomcat5.0.28 From http://jakarta.apache.org Download Module_JK2 from http://jakarta.apache.org Download 2, install Apache to D: / Apache Group / Apache2 Tomcat to E: / Work / Jakarta-Tomcat-5.0.28 Module file is extracted into jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip, copy modules / mod_jk2.so to d: / apache group / apache2 / modules Copy to D: / Apache Group / Apache2 / Conf, CONF / WORKERS2.PROPERTIES.SAMPLE, and renamed for worker1.properties3, modify D: / apache group / apache2 / conf / httpd.conf, increase loadModule jk2_module "Modules / MOD_JK2 .so "jkset config.file" conf / workers2.properties "apache configuration, restart Apache4, Tomcat default supports AJP 1.3 JK2 connection, so you only need to configure Apache, the rest is to increase the directory that needs access. To worker2.properties, default is [shm] info = scoreboard. Requied 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 = 8009Host = 127.0.0.1

# Define the worker [AJP13: localhost: 8009] channel: localhost: 8009Group = 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 handlergroup = status:. [Shm] info = Scoreboard Requried for reconfiguration and status with multiprocess servers.file = D: / Apache Group / Apache2 / logs / jk2.shmsize = 1048576 Need to modify the Apache's default directory, then I add two directory / servlets-examples and / axis to get the following # defines a loading balancer named lb. Use even if you only, one machine. [Lb: lb]

# Example Socket Channel, Override Port and host. [Channel. Socket: localhost: 8009] Port = 8009Host = localhost

# Define the worker [AJP13: localhost: 8009] channel: localhost: 8009Group = lb

# Map the Tomcat Examples Webapp to the Web Server Uri Space [URI: / JSP-Examples / *] Group = lb [URI: / BBS / *] Group = LB [URI: / servlets-example / *] group = lb [ URI: / axis / *] group = lb [status:] info = status worker, displays runtime information

[URI: / jkstatus / *] info = the tomcat / jkstatus handlergroup = status:

[URI: / *. jsp] worker = ajp13: localhost: 8009 Restart Apache, Tomcat Access http: // localhost / jkstatus / http: // localhost / servlets-example / http: // localhost / axis / http: / / localhost: 8080 / servlets-example / http: // localhost: 8080 / axis Look at the result, if you need to add a new directory, just by the above

转载请注明原文地址:https://www.9cbs.com/read-76054.html

New Post(0)