如何在Apache的conf目录下添加workers2.properties文件内容?
这篇是上一篇的补充材料。
注:为便于在这里显示,我把文件中的“[”和“]”都替换为“{”和“}”了。
{logger}
level=DEBUG
{config:}
#file=${serverRoot}/conf/workers2.properties
#这里就是这个配置文件的路径
file=D:/Apache/Apache2/conf/workers2.properties
debug=0
debugEnv=0
#在这里定义环境变量,即便外部环境变量没有定义也无关系
JAVA_HOME=D:j2se
TOMCAT_HOME=D: omcat
{uriMap:}
info=Mapstherequests.Options:debug
debug=0
#Alternatefilelogger
#{logger.file:0}
#level=DEBUG
#file=${serverRoot}/logs/jk2.log
{shm:}
info=Scoreboard.Requiredforreconfigurationandstatuswithmultiprocessservers
#注:这里的${serverRoot}就是apache的安装路径
file=${serverRoot}/logs/jk2.shm
size=1000000
debug=0
disabled=0
{workerEnv:}
info=Globalserveroptions
timing=1
debug=0
#DefaultNativeLogger(apache2orwin32)
#canbeoverridentoafilelogger,useful
#whentracingwin32relatedissues
#logger=logger.file:0
{lb:lb}
info=Defaultloadbalancer.
debug=0
#{lb:lb_1}
#info=Asecondloadbalancer.
#debug=0
{channel.socket:localhost:8009}
info=Ajp13forwardingoversocket
debug=0
tomcatId=localhost:8009
#{channel.socket:localhost:8019}
#info=Asecondtomcatinstance.
#debug=0
#tomcatId=localhost:8019
#lb_factor=1
#group=lb
#group=lb_1
#disabled=0
#{channel.un:/opt/33/work/jk2.socket}
#info=Asecondchannelconnectingtolocalhost:8019viaunixsocket
#tomcatId=localhost:8019
#lb_factor=1
#debug=0
{channel.jni:jni}
info=Thejnichannel,usediftomcatisstartedinprocess
{status:}
info=Statusworker,displaysruntimeinformations
{vm:}
info=ParametersusedtoloadaJVMintheserverprocess
#注意:下面这一段是关键,主要的是classpath,将影响tomcatstarter类的查找
JVM=$(JAVA_HOME)/jre/bin/server/jvm.dll
classpath=${TOMCAT_HOME}/bin/bootstrap.jar
classpath=${TOMCAT_HOME}/bin/commons-logging-api.jar
classpath=${TOMCAT_HOME}/bin/commons-daemon.jar
classpath=${TOMCAT_HOME}/server/lib/tomcat-jni.jar
classpath=${TOMCAT_HOME}/server/lib/commons-modeler.jar
classpath=${TOMCAT_HOME}/server/lib/tomcat-util.jar
classpath=${TOMCAT_HOME}/server/lib/commons-digester.jar
classpath=${TOMCAT_HOME}/server/lib/commons-beanutils.jar
classpath=${TOMCAT_HOME}/server/lib/catalina-ant.jar
classpath=${TOMCAT_HOME}/server/lib/catalina-optional.jar
classpath=${TOMCAT_HOME}/server/lib/commons-fileupload-1.0.jar
classpath=${TOMCAT_HOME}/server/lib/jakarta-regexp-1.3.jar
classpath=${TOMCAT_HOME}/server/lib/tomcat-jk.jar
classpath=${TOMCAT_HOME}/server/lib/tomcat-http11.jar
classpath=${TOMCAT_HOME}/server/lib/servlets-invoker.jar
classpath=${TOMCAT_HOME}/server/lib/servlets-common.jar
classpath=${TOMCAT_HOME}/server/lib/catalina.jar
classpath=${TOMCAT_HOME}/server/lib/jkshm.jar
classpath=${TOMCAT_HOME}/server/lib/jkconfig.jar
classpath=${TOMCAT_HOME}/server/lib/catalina-i18n-ja.jar
classpath=${TOMCAT_HOME}/server/lib/servlets-webdav.jar
classpath=${TOMCAT_HOME}/server/lib/tomcat-coyote.jar
classpath=${TOMCAT_HOME}/server/lib/tomcat-jk2.jar
classpath=${TOMCAT_HOME}/server/lib/servlets-default.jar
classpath=${TOMCAT_HOME}/server/lib/catalina-cluster.jar
classpath=${TOMCAT_HOME}/common/lib/jmx.jar
classpath=${TOMCAT_HOME}/common/lib/jasper-compiler.jar
classpath=${TOMCAT_HOME}/common/lib/jmx-remote-tools.jar
classpath=${TOMCAT_HOME}/common/lib/commons-dbcp-1.1.jar
classpath=${TOMCAT_HOME}/common/lib/commons-el.jar
classpath=${TOMCAT_HOME}/common/lib/commons-collections.jar
classpath=${TOMCAT_HOME}/common/lib/naming-java.jar
classpath=${TOMCAT_HOME}/common/lib/commons-pool-1.1.jar
classpath=${TOMCAT_HOME}/common/lib/jmx-remote.jar
classpath=${TOMCAT_HOME}/common/lib/jasper-runtime.jar
classpath=${TOMCAT_HOME}/common/lib/naming-factory.jar
classpath=${TOMCAT_HOME}/common/lib/servlet-api.jar
classpath=${TOMCAT_HOME}/common/lib/naming-resources.jar
classpath=${TOMCAT_HOME}/common/lib/ant.jar
classpath=${TOMCAT_HOME}/common/lib/naming-common.jar
classpath=${TOMCAT_HOME}/common/lib/jsp-api.jar
classpath=${JAVA_HOME}/lib/tools.jar
OPT=-Djava.class.path=D:/tomcat/bin/tomcat-jni.jar;D:/tomcat/server/lib/commons-logging.jar
OPT=-Dtomcat.home=${TOMCAT_HOME}
OPT=-Dcatalina.home=${TOMCAT_HOME}
OPT=-Xmx128M
#OPT=-Djava.compiler=NONE
disabled=0
{worker.jni:onStartup}
info=CommandtobeexecutedbytheVMonstartup.Thisonewillstarttomcat.
#jk2就是通过这个类来启动tomcat的,上面的classpath如果没有设置正确,jk2将在logfile中记录NoClassDefFound异常。
class=org/apache/jk/apr/TomcatStarter
ARG=startd
disabled=0
stdout=D:/Apache/Apache2/logs/stdout.log
stderr=D:/Apache/Apache2/logs/stderr.log
{worker.jni:onShutdown}
info=CommandtobeexecutedbytheVMonshutdown.Thisonewillstoptomcat.
class=org/apache/jk/apr/TomcatStarter
#这里是关闭tomcat服务,同样通过上面的类进行
ARG=stopd
disabled=0
{uri:/jkstatus/*}
info=Displaystatusinformationandcheckstheconfigfileforchanges.
group=status:
#{uri:127.0.0.1:8003}
#info=Examplevirtualhost.MakesuremyVirtualHostisin/etc/hoststotestit
#alias=myVirtualHost:8003
#{uri:127.0.0.1:8003/ex}
#info=Examplewebappinthevirtualhost.It'llgotolb_1(i.e.localhost:8019)
#context=/ex
#group=lb_1
{uri:/examples}
info=Examplewebappinthedefaultcontext.
context=/examples
debug=0
#{uri:/examples1/*}
#info=Asecondwebapp,thistimegoingtothesecondtomcatonly.
#group=lb_1
#debug=0
{uri:/examples/servlets/*}
info=Prefixmapping
{uri:/examples/*.jsp}
info=Extensionmapping
{uri:/examples/*}
info=Mapthewholewebapp
{uri:/examples/servlets/HelloW}
info=Exampelwithdebugenabled.
debug=10
本文地址:http://www.45fan.com/dnjc/67921.html