apache tomcat集成

为什么集成apache tomcat 就不说了。。。

 

前两天很郁闷的集成这两个东东, 折腾了很久 , 原来发现是下载的版本有问题 !

 

用jk的方式:(这种方式高配)

 

集成步骤:

 

setp1: 下载apache server tomcat tomcat-connectors

 

apache : httpd-2.2.19-win32-x86-no_ssl

tomcat-connectors : tomcat-connectors-1.2.32-windows-i386-httpd-2.2.x

 

setp2: 将mod_jk.so复制到 Apache2.2\modules目录

 

setp3:  配置 httpd

            LoadModule jk_module modules/mod_jk.so

 

JkWorkersFile conf/workers.properties

JkMountFile conf/uriworkermap.properties

JkLogFile logs/mod_jk.log

JkLogLevel warn

 

setp4:conf下新建workers

# # workers.properties # # list the workers by name worker.list=DLOG4J, status # localhost server 1 # ------------------------ worker.s1.port=8009 worker.s1.host=localhost worker.s1.type=ajp13 worker.s1.lbfactor=1 # localhost server 2 # ------------------------ worker.s2.port=9009 worker.s2.host=localhost worker.s2.type=ajp13 worker.s2.lbfactor=1 worker.DLOG4J.type=lb worker.retries=3 worker.DLOG4J.balanced_workers=s1, s2 worker.DLOG4J.sticky_session=1 worker.status.type=status

 

setp5:conf下新建uriworkermap

 

 

/*=DLOG4J

/jkstatus=status

 

!/*.gif=DLOG4J

!/*.jpg=DLOG4J

!/*.png=DLOG4J

!/*.css=DLOG4J

!/*.js=DLOG4J

!/*.html=DLOG4J

 

setp6: 修改TOMCAT配置 server.xml

<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">

jvm1要与之前的配置对应

你可能感兴趣的:(apache tomcat集成)