1. 下载mod_jk2-2.0.43.dll
(地址:http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.1/bin/win32/mod_jk2-2.0.43.dll),并将它复制到APACHE2安装目录下的modules子目录下。 2. 编辑APACHE2的配置文件httpd.conf,在文件的最后加上以下几行。
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
ServerAdmin webmaster@zhangbin
DocumentRoot "D:/jhome/Tomcat4.1/webapps"
ServerName zhangbin
DirectoryIndex index.htm index.html index.jsp 其中DocumentRoot一行要与自己的TOMCAT安装目录一致。DirectoryIndex一行是为了自动解释JSP类型的文件。 3. 在APACHE2安装目录的conf子目录下加入文件workers2.properties,其内容如下: # Define the communication channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
# Map All webapp to the Web server uri space
[uri:/*]
info=Map the whole webapp 其中,URI的部分不一定按上面的定义,可以设置对自己有用的子路径。比如只想公开examples子目录下的东东时,可以如下定义:
# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp
(地址:http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.1/bin/win32/mod_jk2-2.0.43.dll),并将它复制到APACHE2安装目录下的modules子目录下。 2. 编辑APACHE2的配置文件httpd.conf,在文件的最后加上以下几行。
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
ServerAdmin webmaster@zhangbin
DocumentRoot "D:/jhome/Tomcat4.1/webapps"
ServerName zhangbin
DirectoryIndex index.htm index.html index.jsp 其中DocumentRoot一行要与自己的TOMCAT安装目录一致。DirectoryIndex一行是为了自动解释JSP类型的文件。 3. 在APACHE2安装目录的conf子目录下加入文件workers2.properties,其内容如下: # Define the communication channel
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
# Map All webapp to the Web server uri space
[uri:/*]
info=Map the whole webapp 其中,URI的部分不一定按上面的定义,可以设置对自己有用的子路径。比如只想公开examples子目录下的东东时,可以如下定义:
# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.1/bin/win32/
有,剩下同楼上的
dike103(dike) ( ) 的方法我试了不好时,我用的事apache 1.3.27, tomcat 4.1.24 和
mod_jk2-1.3.27.dll
AddModule mod_jk.c
JkWorkersFile "c:\tomcat4.1.18\conf\workers.properties"
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S:%Y]"
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13找一个tomcat3.x的版本,解压后 conf目录下有一个 workers.properties文件修改里面的JAVA_HOME=你的实际安装目录,TOMCAT_HOME=你的实际安装目录,然后将这个文件copy到你的tomcat4.1.*\conf\即可