apache2.0.47 tomcat5.0.12整合
2008-05-24 03:02
429 查看
google_ad_client = "pub-8800625213955058";
/* 336x280, 创建于 07-11-21 */
google_ad_slot = "0989131976";
google_ad_width = 336;
google_ad_height = 280;
//
经过一番折腾,总算搞定了apache与tomcat的整合问题,操作如下:
安装jdk到c:jdk
下载apache http://apache.te8.com/dist/httpd/binaries/win32/apache_2.0.47-win32-x86-no_ssl.msi
下载tomcat http://apache.te8.com/dist/jakarta/tomcat-5/v5.0.12-beta/bin/jakarta-tomcat-5.0.12.exe
下载apache tomcat 连接器 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4/bin/win32/mod_jk_2.0.46.dll 最高版本,2.0.47的没有,不过这个也可同2.0.47工作。
安装tomcat到目录c: omcat,安装apache到c:最后apache主目录为c:apache2,放mod_jk到c:apache2modules目录下
配置apache httpd.conf 使之自动支持中文改AddDefaultCharset ISO-8859-1 为AddDefaultCharset GB2312 在最后增加如下内容:
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk_module modules/mod_jk.dll
JkWorkersFile "C:/Tomcat/conf/workers.properties"
JkLogFile "C:/Tomcat/logs/mod_jk2.log"
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
增加虚拟目录:
Alias /web "D:/www/"
<Directory "D:/www">
Options Indexes MultiViews
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>
在F:Tomcatconf目录下新建文件workers.properties内容如下
workers.tomcat_home=C:Tomcat #让mod_jk模块知道Tomcat
workers.java_home=C:jdk #让mod_jk模块知道j2sdk
ps=
worker.list=ajp13 #模块版本,现有ajp14了,不要修改
worker.ajp13.port=8009 #工作端口,若没占用则不用修改
worker.ajp13.host=localhost #本机,若上面的Apache主机不为localhost,作相应修改
worker.ajp13.type=ajp13 #类型
worker.ajp13.lbfactor=1 #代理数,不用修改
tomcat的server.xml增加一行内容:
<Context path="/web" docBase="D:/www" debug="0" reloadable="true" > </Context>
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
# apr.jniModeSo=F:Apache2modulesmod_jk2-2.0.43.dll
# 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
#request.tomcatAuthentication=true
request.tomcatAuthentication=false
完毕。
先启动tomcat后启动apache,运行http://localhost/web/test.jsp与运行http://localhost:8080/web/test.jsp结果相同即成功。
/* 336x280, 创建于 07-11-21 */
google_ad_slot = "0989131976";
google_ad_width = 336;
google_ad_height = 280;
//
经过一番折腾,总算搞定了apache与tomcat的整合问题,操作如下:
安装jdk到c:jdk
下载apache http://apache.te8.com/dist/httpd/binaries/win32/apache_2.0.47-win32-x86-no_ssl.msi
下载tomcat http://apache.te8.com/dist/jakarta/tomcat-5/v5.0.12-beta/bin/jakarta-tomcat-5.0.12.exe
下载apache tomcat 连接器 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.4/bin/win32/mod_jk_2.0.46.dll 最高版本,2.0.47的没有,不过这个也可同2.0.47工作。
安装tomcat到目录c: omcat,安装apache到c:最后apache主目录为c:apache2,放mod_jk到c:apache2modules目录下
配置apache httpd.conf 使之自动支持中文改AddDefaultCharset ISO-8859-1 为AddDefaultCharset GB2312 在最后增加如下内容:
# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk_module modules/mod_jk.dll
JkWorkersFile "C:/Tomcat/conf/workers.properties"
JkLogFile "C:/Tomcat/logs/mod_jk2.log"
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
增加虚拟目录:
Alias /web "D:/www/"
<Directory "D:/www">
Options Indexes MultiViews
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>
在F:Tomcatconf目录下新建文件workers.properties内容如下
workers.tomcat_home=C:Tomcat #让mod_jk模块知道Tomcat
workers.java_home=C:jdk #让mod_jk模块知道j2sdk
ps=
worker.list=ajp13 #模块版本,现有ajp14了,不要修改
worker.ajp13.port=8009 #工作端口,若没占用则不用修改
worker.ajp13.host=localhost #本机,若上面的Apache主机不为localhost,作相应修改
worker.ajp13.type=ajp13 #类型
worker.ajp13.lbfactor=1 #代理数,不用修改
tomcat的server.xml增加一行内容:
<Context path="/web" docBase="D:/www" debug="0" reloadable="true" > </Context>
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
# apr.jniModeSo=F:Apache2modulesmod_jk2-2.0.43.dll
# 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
#request.tomcatAuthentication=true
request.tomcatAuthentication=false
完毕。
先启动tomcat后启动apache,运行http://localhost/web/test.jsp与运行http://localhost:8080/web/test.jsp结果相同即成功。
相关文章推荐
- apache_2.0.47与tomcat_5.0.19整合
- Windows2000 server和windows 2003下的Apache2.0.47与Tomcat5.0.4的整合配置方法
- Apache2.0.47和Tomcat4.1.27整合
- Windows2000 server和windows 2003下的Apache2.0.47与Tomcat5.0.4的整合配置方法
- Windows2000+Apache2.0.47+Tomcat4.1.27+mod_jk_2.0.50+j2sdk1.4.2的整合配置方法
- 在2000下整合Tomcat5.0+Apache2.0.50+mod_jk_2.0.47.dll
- apache_2.0.47与tomcat_5.0.19整合
- Windows2000 server下的Apache2.0.47与Tomcat4.1.27的整合配置方法
- 在win2003下整合了整合Tomcat5.5+ apache_2.0.53+ mod_jk_2.0.47.dll
- apache整合tomcat
- apache2.2 1.2 与tomcat的整合
- 在httpd.conf中使用反向代理整合apache与tomcat
- apache2.2 Tomcat7 整合
- Apache2.2和Tomcat5.5整合
- Linux Apache、Tomcat整合实用版
- CentOS7 apache与tomcat整合实现静态动态网页分离
- linux下的apache和tomcat整合
- Apache+Tomcat+虚拟机整合
- Jsp和PHP共用80端口,整合Apache和Tomcat
- apache+tomcat整合全过程记录