Basic configuration method and outline description of the integration of Apache and Tomcat server _linux

Source: Internet
Author: User
Tags tomcat tomcat server
First, of course, install Apache HTTP server and prepare mod_jk.so files, which can be found in http://apache.org, and note that mod_jk.so versions correspond to the versions of Apache HTTP server, If there is no corresponding need to recompile their own Apache, but generally not necessary, there will be a corresponding version.

Begin:

1. Install Apache HTTP server,server name and Domain name are 127.0.0.1

2. Copy the mod_jk.so to the modules directory of the Apache installation directory

3. At the end of the conf/httpd.conf, add:

#For Windows include the actual mod_jk path in double quotes

#if The path contains any white spaces.

LoadModule Jk_module modules/mod_jk.so

4. In the command line into the Apache installation directory in the bin directory, enter httpd-d Dump_modules to verify the success of the load (only after 2.2 version applicable)

5. At the end of conf/httpd.conf, add:

Jkworkersfile conf/workers.properties #读取记录服务器配置信息的文件

Jklogfile Logs/mod_jk.log #输出日志的位置

Jkloglevel Debug #最高日志级别

6. In Conf/workers.properties (if not new) join:

Worker.list = tomcat8621 #tomcat8621可自定义 for the name you gave the application server

Worker.tomcat8621.type = ajp13

Worker.tomcat8621.host = 127.0.0.1 #如果不是连接远程服务器, the native test is 127.0.0.1 or localhost

7. By adding in conf/httpd.conf:

jkmount/kaixinpp/* tomcat8621 #意义是形如http: All visits to//localhost/kaixinpp/are forwarded to tomcat8621 processing

8. Determine the configuration file for Tomcat Server.xml

〈connector port= "8009" protocol= "ajp/1.3" redirectport= "8443"/〉

This row is not commented

9. Start Tomcat and Apache in turn, visit http://localhost/kaixinpp/to display the KAIXINPP project homepage

============================================================

Summarize:

1. The final configuration added in Apache/conf/httpd.conf is as follows:

#For Windows include the actual mod_jk path in double quotes

#if The path contains any white spaces.

LoadModule Jk_module modules/mod_jk.so

Jkworkersfile conf/workers.properties

Jklogfile Logs/mod_jk.log

Jkloglevel Debug

jkmount/kaixinpp/* tomcat8621

2. The configuration in Workers.properties is as follows:

Worker.list = tomcat8621

Worker.tomcat8621.type = ajp13

Worker.tomcat8621.host = 127.0.0.1

3. Ensure that the server.xml of Tomcat

〈connector port= "8009" protocol= "ajp/1.3" redirectport= "8443"/〉

This row is not commented

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.