Apache2 and Tomcat5 in Win32 Environment with JK2 consolidated experience
JK2 download address:
Http://apache.linuxforum.net/dist/jakarta/tomcat-connectors/jk2/binaries/win32/jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip
Here you have installed Apache2 and Tomcat5 installed
1 Put the jk2.properties file to $ {tomcat_home} / confes,
Put the workers2.properties file to $ {apache2} / confes,
Among them, all JK2.Properties is all commented by default, and it doesn't matter, you will use the downloaded default.
Plus the following line, request.tomcatauthentication = false, I don't know very well
Workers2.properties should be aware of at least three parts:
[shm:]
INFO = Scoreboard. Required for reconfiguration and status with multiprocess Servers
FILE = E: / Program Files / Apache Software Foundation / Tomcat 5.0 / Temp / jk2.shm
SIZE = 1048576
[Channel.socket: Localhost: 8009]
INFO = ajp13 forwarding over socket
Tomcatid = localhost: 8009
# Map Webapps to The Web Server Uri Space
[URI: / JSP-Examples / *]
[URI: / servlets-example / *]
The first part of the filename path under Windows uses "/" or "/", it doesn't matter (it is not as someone on the Internet) and the line can save;
The second part can be written, which means that the JK2 is working with port 8009.
The third part is a URI mapping table, and the path to explain with Tomcat is written according to the example, and you can add it if you need it.
2 Download MOD_JK2.SO files to $ {apache2} / modules directory,
Plus a line in httpd.conf under $ {apache2} / confes:
LoadModule JK2_Module Modules / MOD_JK2.SO
3 follow up Apache2, restart Tomcat5,
Summarize, in fact, only mod_jk2.so is a file, other jk2.properties, workers2.properties can be established by themselves.
testing method:
Open http: // localhost: 8080 / jsp-example /, you should access it normally (through Tomcat5)
Delete the port number, which becomes http: // localhost / jsp-examples /, and can also access (via Apache2).
4 If there is a problem, check the following may:
* Whether to put the workers2.properties file in the correct place to $ {apache2} / confes
* Check if java_home, etc. in system parameters, etc.
* Sometimes Apache2 cannot be activated in httpd.conf, check whether only LoadModule JK2_Module Modules / Mod_jk2.so is added.
* Some machines may be 80, 8080, 8009 These ports have been occupied, and the occupied programs can be turned off, or the method of changing the default port is resolved. (To stop the IIS, Tomcat service first, use the netstat -an command to see which ports are occupied)
Compared with the integration of IIS5, the integration of Apache2 is much simpler. It is mainly the registry of IIS5 to change here. No need, but the position of the workers2.properties file cannot be placed casually, only in Apache2 Configuration Contents and HTTPD .conf the same directory $ {apache2} / conf. (Thanks to the efforts of these integrated peers before, this article is a summary of personal experience, please indicate the source)
Yanqlv
2004/09/24