Use Apache for domain forwarding (tomcat/jboss) under Linux

Source: Internet
Author: User
Tags jboss tomcat server

Linux under the installation, configuration JDK does not elaborate, the online information is many;

In the installation of Apache may encounter a lot of problems, such as Apr not found,pcre-config to Libpcre not found and other issues, which are related to the specific environment of the system, detailed solutions here do not elaborate, recommend a few solutions, can be integrated according to the specific situation to troubleshoot problems, do not rely too much on a program, to the remedy, link address:

Http://www.cnblogs.com/JemBai/archive/2012/11/07/2759139.html

http://blog.csdn.net/chaijunkun/article/details/6987443

http://blog.csdn.net/yaday/article/details/7535818

When the system environment is configured, the first step is to download the mod_jk.so component and put it into the apache/modules/directory;

The second step is to add the httpd.conf file

<span style= "White-space:pre" ></span># load mod_jk module loadmodule jk_module modules/mod_jk.so# Specify MOD_JK The location of the configuration file workers.properties required by the module Jkworkersfile conf/workers.properties# Specify the location of the log file for the MOD_JK module Jklogfile logs/mod_jk.log# Specify the log level of the MOD_JK module Jkloglevel warn# Specify the log format of the MOD_JK module Jklogstampformat "[%a%b%d%h:%m:%s%Y]

Add location load to the bottom of loadmodule

<span style= "White-space:pre" ><span style= "FONT-FAMILY:SIMHEI;FONT-SIZE:14PX;" ><virtualhost *:80> ServerName aaa.box.com serveralias aaa.box.com jkmount/* tomcat01 </virtualhos t> <virtualhost *:80> ServerName bbb.box.com serveralias bbb.box.com jkmount/* tomcat02 </virtua lhost> <virtualhost *:80> ServerName ccc.box.com serveralias ccc.box.com jkmount/* tomcat03 </vi Rtualhost></span></span>


You can also create a separate jk.conf file, put the above code in jk.conf, and add include conf/jk.conf in httpd.conf.

the second step, add workers.properties under apache/conf directory, the code is as follows

Worker.list = tomcat01,tomcat02,tomcat03#------------------------# first Tomcat server #------------------------WOR ker.tomcat01.port=8099 worker.tomcat01.host=localhost worker.tomcat01.type=ajp13 #------------------------# Second  Tomcat Server #------------------------worker.tomcat02.port=8011 worker.tomcat02.host=localhost worker.tomcat02.type=ajp13#------------------------# Third Tomcat server #------------------------worker.tomcat03. port=8008 Worker.tomcat03.host=localhost worker.tomcat03.type=ajp13


You can restart Apache.

Precautions:

1. If the Apache version is below 2.4, you need to add Namevirtualhost before <virtualhost *:80> *:80

2.workers.properties file must have workers.properties, or will be reported 500 error


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.