强烈质疑没有人成功合成tomcat5.14&apache2.0.48,解决了再分批给300分
看了很多文档,新的和旧的
很少是tomcat5.0 和jk2的,都是jk和tomcat4.1
我试验了很多次都没成功,所以我强烈怀疑
apache--->jk2<----->tomcat---jk2.properties
| |
| |
workers2.properties server.xml
--------------------------------
现在的问题是我的apache把全部工作都交给tomcat了
关闭tomcat,apache会报什么web container error,
关闭apache, 直接http://localhost/无法访问tomcat主页,访问http://localhost:8080可以
两个全部打开,无论是主页还是出错信息啊,都变成tomcat的了,也能直接http://localhost/访问tomcat主页
我看来是worker2.properties 错了,
请大家指点我,万分感谢
只能放100分了,分次给大大们,谢谢
------------------------
我的4个配置文件
httpd.conf:
###下面是我添加的设置~alin
#管理员的邮箱
ServerAdmin alinjava.student@sina.com
#我在宿舍网里的ip
ServerName 192.168.0.2:80
#记得加上index.jsp
DirectoryIndex index.html index.html.var index.jsp
#输入你的ip或域名默认访问的根目录文件夹
DocumentRoot "J:/homepage"
#只允许J:/homepage/download文件夹资源可以被客户端浏览
#如果你在客户端浏览器里输入未经允许的地址将会出现
#403 forbidden 错误
<Directory "J:/homepage/download">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
DefaultLanguage zh-CN
AddDefaultCharset GB2312
#装载jk2模块,用于处理连接jsp容器(我用tomcat5.0.14beta2)
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
###下面是删掉的设置旧版mod_jk的语句~alin
#设置模块的工作文件
#LoadFile "C:/Tomcat/conf/workers.properties"
#JkWorkersFile "D:/system/Tomcat5/conf/workers.properties"
#设置模块工作的日志文件,Tocmat启动时会自建
#JkLogFile "D:/system/Tomcat5/logs/mod_jk2.log"
#让Apache支持对servlet传送,用以Tomcat解析
#JkMount /servlet/* ajp13
#让Apache支持对jsp传送,用以Tomcat解析
#JkMount /*.jsp ajp13
workers2.properties ----自己在apache/conf下建立
[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
file=D:/system/Apache2/logs/jk2.shm
size=1000000
debug=0
disabled=0
[logger]
level=DEBUG
[config:]
file=D:/system/Apache2/conf/workers2.properties
debug=0
debugEnv=0
[workerEnv:]
info=Global server options
timing=1
debug=0
[lb:lb]
info=Default load balancer.
debug=0
# Define the communication channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009
[uri:/*]
info=Map all webapp to the Web server uri space
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=D:/system/Apache2/logs/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
server.xml:
修改的如下
<!-- alin~~~~alin~~~~~~alin~~~~~~~ Define the default virtual host -->
<Host name="localhost" debug="0" appBase="J:/homepage/webApp" unpackWARs="true" autoDeploy="true">
<!-- alin~~~alin~~~~alin~~~~~~~~~~Tomcat Root Context -->
<Context path="" docBase="test" debug="0" />