RedHatAS5 integrates Apache and Tomcat server applications

Source: Internet
Author: User

 

AS5 comes with Tomcat 5, which is very convenient. We recommend that you run all the RPM packages cp and install them with YUM. This is not the focus of this article. it is very convenient to install Tomcat in AS5. Apache uses the RPM package for installation.

1. Download mod_jk

Current mod_jk connector stable version is 1.2.23, use a Web browser to access http://www.apache.org/dist/tomca... es/linux/jk-1.2.23/, download mod_jk-1.2.23-apache-2.2.x-linux-i686.so.

2. install and configure mod_jk

Mv mod_jk-1.2.23-apache-2.2.x-linux-i686.so/etc/httpd/modules/mod_jk.so

Create a subdirectory jk in the/usr/share/tomcat5/conf directory, and create the file works. properties. The content is as follows:

       
        
Workers. tomcat_home =/usr/share/tomcat5workers. java_home =/us/lib/jvm/javaps =/worker. list = ajp13worker. ajp13.port = 8009worker. ajp13.host = 127.0.0.1worker.ajp13.type = ajp13worker. ajp13.lbfactor = 1vi/usr/share/tomcat5/conf/server. xml, add it under the statement
       

Restart Tomcat 5

Cp/usr/share/tomcat5/conf/auto/mod_jk.conf/usr/share/tomcat5/conf/jk

Mv/usr/share/tomcat5/conf/jk/mod_jk.conf/usr/share/tomcat5/conf/jk/mod_jk.conf-auto

Vi/usr/share/tomcat5/conf/mod_jk.conf-auto, change the content of this file as follows:

LoadModules jk_module "/etc/httpd/modules/mod_jk.so"

JkWorkersFile "/usr/share/tomcat5/conf/jk/workers. properties"

JkLogFile "/usr/share/tomcat5/logs/mod_jk.log"

JkLogLevel emerg

ServerNmae localhost

JkMount/*. jsp ajp13

3. Configure Tomcat vi/usr/share/tomcat5/conf/server. xml

Add the following statement after xmlValidation = "false" xmlNamespaceAware = "false">:

4. Configure Apache vi/etc/httpd/conf/httpd. conf

Add the following statement to the last line:

Include/usr/share/tomcat5/conf/jk/mod_jk.conf-auto

5. Restart the Apache service and Tomcat service.

6. Test the integration of Apache and Tomcat.

Vi/var/www/html/test. jsp

Hello! The time is

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.