Brief configuration Summary of Apache Tomcat JK 1.3 in Windows

Source: Internet
Author: User
Tags apache tomcat

This article is from: Himmel

Posting time: Tue, 15 Jul 2008 08:28:09 + 0000
Http://www.ryanwong.name/blog? P = 295

 

Software Environment

  • Windows XP Home SP3
  • JDK 6.0
  • Apache Tomcat 6.14
  • Apache httpd 2.2.x

Prerequisites

  1. Confirm that Tomcat is correctly installed and enter http: // localhost: 8080 in the browser

    Tomcat welcome page appears

  2. Confirm that Apache 2.2 is correctly installed and enter http: // localhost in the browser
    It works appears! Words

For the above content, please refer to its official website: http://tomcat.apache.org
Http://httpd.apache.org/

Download mod_jk

Select the JK download suitable for your system:

The name for Apache 2.2 is mod_jk-1.2.26-httpd-2.2.4.so
After the download, rename it mod_jk.so and put it in the modules directory of Apache httpd.
Configure Apache httpd 2.2.

Open the configuration file httpd. conf.
Add the loading module configuration (we recommend that you add it before mod_rewrite)
Loadmodule jk_module modules/mod_jk.so is added to the end of the configuration file

Reference:

Jkworkersfile CONF/workers. Properties
Jklogfile logs/mod_jk.log
# Set the jk log level [debug/error/info]
Jkloglevel info
# Select the log format
Jklogstampformat "[% A % B % d % H: % m: % S % Y]"
# Jkoptions indicate to send SSL key size,
Jkoptions + forwardkeysize + forwarduricompat-forwarddirectories
# Jkrequestlogformat set the request format
Jkrequestlogformat "% w % v % t"

The workers. properties file is used in the middle.
Create this file in the conf directory, including the following content

Reference:

# Define 1 ajp13 worker
Worker. List = worker1
# Set Properties for worker1 (ajp13)
Worker. worker1.type = ajp13
Worker. worker1.host = 127.0.0.1
Worker. worker1.port = 8009
Worker. worker1.lbfactor = 50
Worker. worker1.socket _ keepalive = 1
Worker. worker1.socket _ timeout = 300

Now, some paths need to be mapped to the Tomcat server for processing.
Simple ing sub-Path

Add this sentence.

Jkmount/APP * worker1

At this time, when you access http: // localhost/APP
It is equivalent to accessing http: // localhost: 8080/APP

Use vhost

Reference:

Loadmodule vhost_alias_module modules/mod_vhost_alias.so

Loads CONF/extra/httpd-vhost.conf

Reference:

# Virtual hostsinclude CONF/extra/httpd-vhosts.conf

Open the file and edit it as needed. I added the following content. Of course, DNS settings and other support are required.
Replace [] with <> NO.

Reference:

[Virtualhost core.ave7.net: 80]
Serveradmin lazing@ave7.net

Servername core.ave7.net
Jkmount/* worker1
[/Virtualhost]

Therefore, when you enter http: // localhost
When accessing the original httpd resource, enter the http://core.ave7.net
Is equivalent to accessing http: // localhost: 8080
(Modified the hosts file)
Tags: Apache
, Httpd
,
Tomcat

Related posts

  • No related posts.
Related Article

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.