WinXP Pro 上整合 Apache 2.0.48 + Tomcat 5.0.19
软件准备:
Apache 2.0.48
http://apache.linuxforum.net/dist/httpd/binaries/win32/apache_2.0.48-win32-x86-no_ssl.msi
Tomcat 5.0.19
http://apache.linuxforum.net/dist/jakarta/tomcat-5/v5.0.19/bin/jakarta-tomcat-5.0.19.zip
jk2
(把包内的mod_jk*.dll改名为mod_jk2.dll)
安装:
Apache在d:\apache2048
Tomcat在d:\tomcat
并复制mod_jk2.dll到D:\Apache2048\Apache2\modules目录下
1.编辑D:\Apache2048\Apache2\conf\httpd.conf文件,加上
LoadModule jk2_module modules/mod_jk2.dll
2.注释掉
# AddDefaultCharset ISO-8859-1
3.文件尾部的改成
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "D:\tomcat\webapps"
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
4. D:\Apache2048\Apache2\conf目录加一workers2.properties文件:
[shm]
file=${serverRoot}/logs/shm.file
size=1048576
# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8019]
channel=channel.socket:localhost:8009
# Uri mapping
[uri:/*]
worker=ajp13:localhost:8009
OK !
起动apache 和 tomcat , http://localhost 该是和 http://localhost:8080 一样的了
附:
大部分是参考了他人文章,所以不是原创.