본문 바로가기

WEB-SERVER/OHS & JBCS & Apache

[Apache2.4] mod_jk 관련 연동 파일 및 옵션 정리

728x90

[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

# the location of jk shared memory
JkShmFile logs/mod_jk.shm

# 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
# Note: Changed from +ForwardURICompat.
# See http://tomcat.apache.org/security-jk.html
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories

# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"

# You can use external file for mount points
# It will be checked for updates each 60 secondes
# The format of the file is : /url=worker
# /examples/*=loadbalancer
JkMountFile conf/uriworkermap.properties

 

[workers.properties]

## Define list of workers that will be used
## for mapping requests
## The configuration directives are valid
## for the mod_jk version 1.2.18 and later
##----------------------------------------------------------
#
#####################
##01. worker templates
#####################
#
worker.template.type=ajp13
worker.template.lbfactor=1
# worker.template.socket_timeout 서버간 TIMEOUT --> 단위 : s
worker.template.socket_timeout=300
# worker.template.reply_timeout 브라우저 TIMEOUT --> 단위 : ms
worker.template.reply_timeout=300000
worker.template.retries=0
worker.template.ping_mode=A
worker.template.recovery_options=3
worker.template.connection_pool_minsize=25
worker.template.connection_pool_size=25
#
##----------------------------------------------------------
#
#####################
##02. worker list
#####################

#worker list
worker.list=jkstatus,workers

##worker jkstatus
worker.jkstatus.type=status

##worker
worker.workers.balance_workers=worker11,worker12
worker.workers.type=lb
worker.workers.method=Session
worker.workers.session_cookie=JSESSIONID
worker.workers.retries=0

#----------------------------------------------------------

####################
#03. node list
####################

#node1
worker.worker11.reference=worker.template
worker.worker11.host=WAS_IP
worker.worker11.port=WAS_AJP_PORT

#node2
worker.worker12.reference=worker.template
worker.worker12.host=WAS_IP
worker.worker12.port=WAS_AJP_PORT

#----------------------------------------------------------

 

 

[urimapping.properties]

# Simple worker configuration file

# Mount the Servlet context to the ajp13 worker
#/jmx-console=ajp13
#/jmx-console/*=ajp13
#/web-console=ajp13
#/web-console/*=ajp13

#jkstatus
/jkstatus=jkstatus
/jkstatus/*=jkstatus

#jsp url turn to ajp
/*.jsp=workers

## 만약 <VirtualHost> 를 구성하게 된다면
##<VirtualHost>
##...
##JkMount /*.jsp workers 이러한 양식으로 urimapping이 필요하다
##</VirtualHost>