下载mod_jk connector:
http://apache.mirrors.tds.net/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.42-src.tar.gz
编译并安装好.
配置文件中写:
LoadModule jk_module modules/mod_jk.so //加载模块
#/opt/apache24/conf
JkWorkersFile /opt/apache24/conf/workers.properties //worker的配置
JkMount /wp2/* worker1 //worker的目录
官方文档写的在配置文件中加入的内容:
# Load mod_jk module
LoadModule jk_module modules/mod_jk.so
# Add the module (activate this lne for Apache 1.3)
# AddModule mod_jk.c
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk shared memory
JkShmFile /var/log/httpd/mod_jk.shm
# Where to put jk logs
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Send requests for context /examples to worker named worker1
JkMount /examples/* worker1
这个则是对应的workers.properties文件内容:
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
# 如果是远程机器, 则是IP
worker.worker1.host=localhost
# ajp13默认是8009端口
worker.worker1.port=8009