Integration purposes (completely expected) ------------------------------------------- ---------------------------------- Apache and Tomcat can be used as separate web servers, Apache Powerful, efficient, but does not support JSP and SERLET, and Tomcat is opposite, so it is necessary to combine them. By loading the integrated module and setting in Apache, Apache can transfer the request to Tomcat. Related to the request of the URL, version of the selection: ---------------- -------------------------------------------------- ------------ 1.Apache httpd2.0.x, what is the difference between the version of Apache1.3.x, I don't know, there should be a leap, even the name is changed to httpd. And we chose to integrate with JK2, JK2 is based on the ideological development of Apache 2.0 (English is too bad, see the original text: JK2 HAS BEEN Developed with apache 2.0 in mind), so select httpd2.0.x. 2. Integrated mode -JK2 Why choose JK2? (JK is a replacement to the elderly mod_jserv. It was a completely new Tomcat-Apache plug-in that handles the communication between Tomcat and Apache.The newest JK2 is a refactoring of JK. The native part has been completly restructured and the configuration has BEEN SIMPLIPIED a LOT. I only value the last sentence, huh, huh. There is a detailed description of the previous integration module and JK, JK2 function in JK documents. 3.Tomcat 5.0, J2SDK1.4.x supports Java, JSP, and Servlet's newer standards? It should have a certain relationship between them. It is said that Tomcat5 and JDK1.4 have changed a lot of support for Chinese. Now you can use Chinese, but you can use Chinese, but pages developed for previous JSP standards. Chinese compatibility is not very good. Precautions during the compilation and installation: ------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------- 1.Apache must compile the way to allow the dynamic loading module, That is, in Configure, it is necessary to add a-able-so option because the MOD_JK2 integration module will be loaded. Suppose the Apache installation directory is pathofapache, compiled modules under Pathofapache / Modules, the configuration file is under Pathofapache / Conf. 2.Tomcat will only use compiled versions. Unzip, release the package. (I heard that tomcat is written by Java. I don't know what the advantage of using that Ant compilation is not successful), assuming that the Tomcat installation directory is Pathoftomcat. 3. Jdk I use binary versions, run directly, unzip the release package. (If I don't know how Java_home is set, I don't know how to set up Java_Home and ClassPath environment variables. Java_home can also be assigned in Pathoftomcat / Bin / Catalina.sh, ClassPath, I haven't set it yet, and maybe it is used in JSP to use Java standard classes. 4.
JK2 Module Compile Then the JK2 Package Release After the directory is renamed to pathofjk2, and the current directory is PATHOFJK2 (refer to the JK document, pay attention to the part of the compilation is described in the JK section, and the default should look at the JK2 section, because there are very integrated ways Different .http://jakarta.apache.org/tomcat/tomcat-4.1-doc/JK2/) CD JK / Native2 Chmod 755 Buildconf.sh ./buildconf.sh (because Buildconf.sh has no execution, so Change, but "Summer of Zero" tells me that as long as SH buildconf.sh can be executed) ./configure --with-apxs2 = pathofapache / bin / apxs This apxs is under the bin of the Apache installation directory, so you must first Apache. It is said that only this file has this file, the RPM package is installed without this file. If you want to build an Apache to install the RPM package, you should find the same version to compile it with and then delete it, the version number is exactly the same Otherwise, the module that is compiled cannot be used. There are two parameters, I don't know, I don't understand, just in the JK document: --with-apache = dir, Dir is the path where apache sources are located. The apache source Sources Should Have Been configured before configuring mod_jk DIR is something like:.. /home/apache/apache_1.3.19 It builds a static Apache module --enable-EAPI, This parameter is needed when using Apache-1.3 and mod_ssl, otherwise you will get the error message : "This Module Might Crash Under EAPI!" when loading mod_jk.so in httpd. not needed when --with-apxs HAS been used In addition, I prompt to have an error when I execute Configure, as if I have a path, I will first Start Tomcat and execute it. (Perhaps the reason I did not set up the environment variable of Tomcat directory) Make make install all the documents said that if the release is unsuccessful, then to be manually released, I am also manually released: CP pathofjk2 / build / jk2 / apache2 / mod_jk2. SO pathofapache / modules / configuration file modification --------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The configuration file used by JK2 has 2: jk2.properties, default to put in Pathoftomcat / Conf Workers2.properties By default, the role of these two files in Pathofapache / confes, JK2.properties may be defined Tomcat Workers2.properties may be telling Apache, which is Tomcat supported with Apache's communication port. 1. Profile JK2.Properties for the primary configuration files Server.xml and JK2 in Pathoftomcat / Conf. In fact, I didn't make any modifications to these two files, and JK2.Properties is empty. Look at it in server.xml, it may be that the first behind is next to the integration, there is no need to add.