win2000下集成tomcat+apache

    今天用了半下午终于把tomcat+apache集成了起来,具体过程如下:

1.安装jakarta-tomcat-5.0.14.exe,我的安装目录是D:/tomcat 5.0
2.安装apache_2.0.50-win32-x86-no_ssl.exe,我的安装目录是D:/Program Files/Apache Group/Apache2
3.下载jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip包并解压缩,modules下面有一个
mod_jk2.so文件,拷贝到D:/Program Files/Apache Group/Apache2/modules目录下.
4.在apache安装目录的conf/httpd.conf  加入
    LoadModule jk2_module "modules/mod_jk2.so"
    JkSet config.file "conf/workers2.properties"
5.在apache安装目录下的conf下创建workers2.properties文件,
里面写入下面的配置:

[shm]
info=Scoreboard. Requried for reconfiguration and status with multiprocess servers.
file=c:/Apache/Apache2/Logs/jk2.shm
size=1048576

# Defines a load balancer named lb. Use even if you only have one machine.
[lb:lb]

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=localhost

# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
group=lb

# Map the Tomcat examples webapp to the Web server uri space
[uri:/jsp-examples/*]
group=lb
[uri:/bbs/*]
group=lb
[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:

[uri:/*.jsp]
worker=ajp13:localhost:8009

6.启动apache,访问http://localhost出现apache欢迎页面,说明apache安装成功,
访问http://localhost/jkstatus出现jk的状态信息说明apache和jk集成成功,启动tomcat
,访问http://localhost:8090/出现 tomcat 欢迎页面说明tomcat运行正常,此时访问
http://localhost/bbs/,结果是和http://localhost:8090/bbs/一样的,说明tomcat和apache
成功集成。

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