- 论坛徽章:
- 0
|
mod_jk.so 放在Apache2.2\modules 里
----------------httpd.conf 添加-----------------
# Include mod_jk's specific configuration file
Include conf/mod-jk.conf
----------------httpd.conf 添加-----------------
-------------------mod-jk.conf----------------
# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
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 indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
# Mount your applications
JkMount /application/* loadbalancer
# You can use external file for mount points.
# It will be checked for updates each 60 seconds.
# The format of the file is: /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties
# Add shared memory.
# This directive is present with 1.2.10 and
# later versions of mod_jk, and is needed for
# for load balancing to work properly
JkShmFile logs/jk.shm
# Add jkstatus for managing runtime data
JkMount status
Order deny,allow
Deny from all
Allow from 127.0.0.1
///////////////--mod-jk.conf----/////////////
-----------workers.properties------------
# Define list of workers that will be used
# for mapping requests
worker.list=node1
# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=127.0.0.1
worker.node1.type=ajp13
worker.node1.lbfactor=1
#worker.node1.cachesize=10
# Define Node2
# modify the host as your host IP or DNS name.
#worker.node2.port=8009
#worker.node2.host= 172.16.16.8
#worker.node2.type=ajp13
#worker.node2.lbfactor=1
#worker.node2.cachesize=10
# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1
#worker.list=loadbalancer
# Status worker for managing load balancer
worker.status.type=status
-----------workers.properties------------
------------------uriworkermap.properties-------------
/*.jsp=node1
/examples/*=node1
------------------uriworkermap.properties-------------
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4864/showart_313343.html |
|