实战apache+tomcat+mod_jk整合
发表于:2007-06-08来源:作者:点击数:
标签:
在做本实验之前你应该安装好了apache,j2sdk,tomcat。有问题的可以参看我的前一篇文章。这里就着重介绍mod_jk. 下载jakarta-tomcat-connectors-jk-1.2.4-src.tar.gz cd/www tar-xzfjakarta-tomcat-connectors-jk-1.2.4-src.tar.gz mvjakarta-tomcat-connector
在做本实验之前你应该安装好了apache,j2sdk,tomcat。有问题的可以参看我的前一篇文章。这里就着重介绍mod_jk.
下载jakarta-tomcat-connectors-jk-1.2.4-src.tar.gz
cd /www
tar -xzf jakarta-tomcat-connectors-jk-1.2.4-src.tar.gz
mv jakarta-tomcat-connectors-jk-1.2.4 mod_jk
cd /www/mod_jk/jk/native
./buildconf
./configure --with-apxs=/www/http2/bin/apxs
make
cp apache-2.0/mod_jk.so /www/http2/modules/
准备两个重要的配置文件
修改httpd.conf,告诉
服务器装载mod_jk模块。并配置使之转发特定的请求给tomcat处理
#-------------------mod_jk-------------------
LoadModule jk_module libexec/mod_jk.so
# Declare the module for <IfModule directive>
#AddModule mod_jk.c
# Where to find workers.properties
JkWorkersFile /www/http2/conf/workers.properties
# Where to put jk logs
JkLogFile /www/http2/logs/mod_jk.log
# Set the jk log level [de
bug/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"
# Send servlet for context /examples to worker named worker1
JkMount /examples/servlet/* worker1
# Send JSPs for context /examples to worker named worker1
JkMount /examples/* worker1
新建文件/www/http2/conf/workers.properties
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300
ok现在就可以
测试了
http://ip/examples/jsp/index.html
SoloHilleR 回复于:2003-09-29 21:01:20
|
hehe
好东东!
|
houji 回复于:2003-09-30 10:04:41
|
jakarta-tomcat-connectors-jk-1.2.4-src.tar.gz ,这个已经吓不到了吧。apache网站上找不到。
|
seacaptain 回复于:2003-10-07 09:59:57
|
http://e.pku.edu.cn/在这里可以找到
|
caojiqun 回复于:2003-10-07 11:53:47
|
1.2.4找不到但有新版本1.2.5
http://www.apache.org/dist/jakarta/tomcat-connectors/jk/source/
|
原文转自:http://www.ltesting.net