1.install apache2
2.instal apache2 jk
3.vim /etc/apache2/mods-available/jk.conf
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile /var/log/apache2/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel debug
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# Send everything for context /examples to worker named worker1 (ajp13)
#JkMount /* webstore
4.vim /etc/apache2/mods-available/jk.load
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
5.vim /etc/apache2/workers.properties
# Define 1 real worker using ajp13
worker.list=webstore,sandbox
# Set properties for webstore (ajp13)
worker.webstore.type=ajp13
worker.webstore.host=localhost
worker.webstore.port=8009
worker.webstore.lbfactor=50
worker.webstore.socket_timeout=300
worker.webstore.socket_keepalive=1
worker.webstore.connection_pool_size=20
worker.webstore.connection_pool_minsize=10
worker.webstore.connection_pool_timeout=600