求Apache 2.0 与Tomcat/5.0.28 整合问题。两天了,还没解决
*******我用Apache 2.0 Tomcat/5.0.28 和 mod_jk-apache-2.0.59.so 进行整合,Apache 和tomcat 都能单独运行,但 我在apache2\conf\httpd.conf 中加入
________________________________________________
LoadModule jk_module modules/mod_jk.so
JkWorkersFile "D:/Program Files/Apache Software Foundation/Tomcat 5.0/conf/workers.properties "
JkLogFile logs/mod_jk2.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T "
JkMount /*/servlet/* ajp13w
JkMount /*.jsp ajp13w
JKMount /*.action ajp13w
JKMount /*.ftl ajp13w
JkUnMount /*.gif ajp13w
JkUnMount /*.jpg ajp13w
___________________________________________
这些后再启动Apache就出错了,但tomcat 还能正常运行,
*****************D:\Program Files\Apache Software Foundation\Tomcat 5.0\conf下的workers.properties是这样的:
workers.tomcat_home=D:\Program Files\Apache Software Foundation\Tomcat 5.0
workers.java_home=C:\jdk1.4
ps=/
worker.list=ajp13w
worker.ajp13w.port=8009
worker.ajp13w.host=localhost
worker.ajp13w.type=ajp13
worker.ajp13w.lbfactor=1
____________________________________________
******************D:\Program Files\Apache Software Foundation\Tomcat 5.0\conf下的jk2.properties是这样的:
## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.
## COMMENTS WILL BE _LOST_
## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
# Set the desired handler list
# handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config is working
# shm.file=${jkHome}/work/jk2.shm
# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:
# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess
________________________________________________________
***************D:\Program Files\Apache\Apache2\conf 下的workers2.properties上这样:
[shm]
file=${serverRoot}/logs/shm.file
size=1048576
# Example socket channel override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
# Uri mapping
[uri:/*]
worker=ajp13:localhost:8009
_________________________________________________
***************D:\Program Files\Apache\Apache2\conf 下的mod_jk.conf上这样:
# Load mod_jk module. Specify the filename
# of the mod_jk lib youve downloaded and
# installed in the previous section
#mod_jk
LoadModule jk_module modules/mod_jk-apache-2.0.59.so
# Where to find workers.properties
JkWorkersFile conf/workers2.properties
# 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 indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T "
#
JkMount /cqcbd/* loadbalancer
#/cqcbd/tomcat
#mapbuilderTomcat
#Lookup
HostnameLookups Off
_______________________________________________
搞了半天,也不知道 是哪出了问题。。能给我见解吗?最好有源码;
我的邮箱:fengye_hong@126.com
[解决办法]
参考 http://debian.linuxsir.org/doc/inthedebianway/apache2-tomcat5.5.html
虽然是linux下的,但基本的东西差不多的