是。 Apache与tomcat和jetty连接在一起。我已成功完成其中任何一个(apache + tomcat和apache + jetty)。但是在一起的时候,没有想法。
下面是tomcat中httpd.conf中添加的部分
# Load mod_jk module
LoadModule jk_module "C:\Program Files (x86)\Apache Group\Apache24\manual\mod_jk.so"
# Where to find workers.properties
JkWorkersFile "C:/Program Files (x86)/Apache Group/Apache24/conf/workers.properties"
# Where to put jk logs
JkLogFile "C:/Program Files (x86)/apache-tomcat-7.0.54/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"
# Send servlet for context /examples to worker named ajp13
#JkMount /servlet/* ajp13
# Send JSPs for context /examples to worker named ajp13
JkMount /*.jsp ajp13
JkMount /*.jspa ajp13
JkMount /*.jspx ajp13
JkMount /*.do ajp13
JkMount /*.htm ajp13
Alias /rest "C:/www/projectB"
<Directory "C:/www">
Options Indexes FollowSymLinks
allow from all
</Directory>
Alias /wisemapping "C:\Users\projectA"
<VirtualHost *:80>
ServerName localhost
ServerAdmin localhost
JkMount /* jetty
</VirtualHost>
然后是work.propertis:
workers.tomcat_home="C:\Program Files (x86)\apache-tomcat-7.0.54"
workers.java_home="C:\Program Files\Java\jdk
1.7.0_55"
worker.list=ajp13
worker.ajp13.port=8009 #TOMCAT
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.list=jetty
worker.jetty.port=8007 #JETTY
worker.jetty.host=localhost
worker.jetty.type=ajp13
worker.jetty.lbfactor=2
projectA的Ajp端口是8007.对于projectB是8009 projectA的localport是8080.对于projectB是8088
结果只有其中一个有效。有任何想法吗?也许端口问题?
答案 0 :(得分:0)
据我所知,该文件中可能只有一个worker.list属性。你尝试过类似的东西吗?
worker.list=ajp13,jetty