一:软件
1:apache_2.0.54-win32-x86-no_ssl.msi
2:tomcat5.5
3:jk插件mod_jk-1.2.14-apache-2.0.54.so
二:apache配置
1:将mod_jk-1.2.14-apache-2.0.54.so拷贝到apache的安装目录下的C:\Apache Group\Apache2\modules目录
2:修改C:\Apache Group\Apache2\conf\httpd.conf文件
在其最后加上
LoadModule jk_module modules/mod_jk-1.2.14-apache-2.0.54.so
JkWorkersFile conf/workers2.properties
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 indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
JkMount /* loadbalancer
JkMount /xajob/* loadbalancer
#apache will serve the static picture.
#以下命令意味着所有的图片将由APACHE解析
JkUnMount /*.jpg loadbalancer
JkUnMount /*.gif loadbalancer
JkUnMount /*.swf loadbalancer
JkUnMount /*.bmp loadbalancer
JkUnMount /*.png loadbalancer
3:在C:\Apache Group\Apache2\conf\新建workers2.properties文件
内容为:
#以下为workers2.propertie的内容
worker.list=loadbalancer,server105,server106
# Define the first node...
worker.server105.port=8009
worker.server105.host=127.0.0.1
worker.server105.type=ajp13
worker.server105.lbfactor=1
#worker.server105.local_worker=1
worker.server105.cachesize=100
# Define the 2nd node...
worker.server106.port=8009
worker.server106.host=127.0.0.1
worker.server106.type=ajp13
worker.server106.lbfactor=1
#worker.server106.local_worker=1
worker.server106.cachesize=100
# Now we define the load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=server105,server106
worker.loadbalancer.sticky_session=1
4:修改修改C:\Apache Group\Apache2\conf\httpd.conf文件
把DirectoryIndex index.html index.html.var改为DirectoryIndex index.html index.htm index.jsp
Directory "C:/tomcat5/webapp/root/"
DocumentRoot "C:/tomcat5/webapp/root/"
既把Directory DocumentRoot 改到tomcat的默认目录
5:重新启动apache和tomcat
posted on 2007-02-06 15:46
南战航 阅读(1266)
评论(0) 编辑 收藏