博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
tomcat5.5 整合 iis6.0
阅读量:4050 次
发布时间:2019-05-25

本文共 5095 字,大约阅读时间需要 16 分钟。

tomcat5.5 整合 iis6.0

 

参考网上好多转贴,终于配置成功了

环境:Windows 2003 R2 + IIS 6.0 + JDK 1.5+TOMCAT5.5

1. 安装tomcat

 

2. 下载jk

 

安装的好处就是配置文件都有了。只需做少许修改:

安装目录可以随意(最好让目录不带空格),安装完成后在conf里就是它的配置文件,安装完后找到目录文件/Apache Software Foundation/Jakarta Isapi Redirector 这个可以根据你自己的改动,在conf文件里把workers.properties.minimal它改为

workers.properties,对应找到注册表里的

HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/1.0] 中的worker_file 点右键修改

同样去掉workers.properties.minimal 后的minimal

 

3. 以下为两个文件的内容

                uriworkermap.properties:

 

                # Mapping the URI /admin, /manager, /jsp-examples and /servlets-examples and

                # everything under them to Tomcat

                # /admin/*=ajp3

                # /manager/*=ajp13

                # /jsp-examples/*=ajp13

                # /servlets-examples/*=ajp13

 

                # Mapping all URI which end with a common suffix .jsp and .do to Tomcat

                # /*.jsp=ajp13

                # /*.do=ajp13

 

                # Mapping all URI to Tomcat

                 /*=ajp13

 

                worker.properties:

 

                worker.list=ajp13

                worker.ajp13.type=ajp13

                worker.ajp13.host=localhost

                worker.ajp13.port=8009

 

4. iis里新建一个站点,指向网站所在的目录(比如$CATALINA_HOME/webapps/ROOT),然后在站点上点右键选“属性”,在弹出的页框里选择“ISAPI筛选器”,点“添加”,筛选器名称填jakarta,可执行文件中填入你的isapi_redirector.dll的绝对路径。“确定”后点“确定”关闭属性页。再在“默认网站”上右键,选择“新建”->“虚拟目录”,别名填jakarta,下一步,路径选为你的isapi_redirector.dll存放的目录。

 

5. 在“Internet信息服务管理器”的“网站”中的“Web服务扩展”上点右键选择“添加一个新的Web服务扩展”,弹出的框中扩展名填Tomcat(其实无所谓的),“要求的文件”选“添加”然后找到你的isapi_redirector.dll后“确定”。“设置扩展状态为允许”也打上勾,确定。

 

6. 如果要让iis能读取index.jsp这样的jsp默认首页,还需要在IIS6.0右键单击【默认网站】,选择【属性】,单击【主目录】选项卡中的【配置】,单击【映射】选项卡,单击【添加】,将isapi_redirector.dll的全路径写进去,扩展名要写.jsp(注意:如果你的路径包含空格,那么你需要将这个完整路径用英文的双引号括起来才能添加)。

到这里就配置完了

 

7. 重起tomcat 重启iis 去掉端口后看看能运行了吧

 

总结:

    说到底,这就是两种服务的一种集成,使之外部看起来像一种服务,可以这么理解:

外部访问域名-->解析后到IP-->IIS查找相应站点-->发现jsp文件-->转至jk连接处理-->将相应文件解释转给Tomcat-->将页面返回给IIS-->展现给客户端。

那么哪出了问题,就查哪,一步一步来,一定能成功的,希望对大家有所帮助,另外多看官方手册,多想其中的原理,网上流传的各种文档不一定就是正确的,包括本文,只是尽量详尽的给一种引导。

 

 

System Requirements

For this installation I used the following:

Windows Server 2003 Enterprise Edition

Internet Information Services (IIS) 6.0

Sun Java Runtime JRE 5.0 Update 2

Apache Jakarta Tomcat version 5.5.9

The JK Tomcat Web Server Connectors

 

1.       Install the JDK and Tomcat and set the environment variable.

2.       Configure JK

Download JK from

Setup the file. (It’s better that there isn’t blank space in the directory which you choose to install.)

After installing it, you could find the file “workers.properties.minimal” in /Apache Software Foundation/Jakarta Isapi Redirector, and change its name to “workers.properties”.

Open the Registry Editor; Open the “HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/1.0]”

Change the value “workers.properties.minimal”of worker_file to “workers.properties”

The content of worker.properties and uriworkermap.properties is follow:

worker.properties:

                worker.list=ajp13

                worker.ajp13.type=ajp13

                worker.ajp13.host=localhost

                worker.ajp13.port=8009

uriworkermap.properties:

                # Mapping the URI /admin, /manager, /jsp-examples and /servlets-examples and

                # everything under them to Tomcat

                # /admin/*=ajp3

                # /manager/*=ajp13

                # /jsp-examples/*=ajp13

                # /servlets-examples/*=ajp13

 

                # Mapping all URI which end with a common suffix .jsp and .do to Tomcat

                # /*.jsp=ajp13

                # /*.do=ajp13

 

                # Mapping all URI to Tomcat

                /*=ajp13

 

3.       Create a new website in IIS which point to your website (such as $CATALINA_HOME/ webapps/ROOT)

4.       Configure the Tomcat ISAPI Filter

Rigth click your websiteàPropertiesàISAPI FiltersàAddàset Filter name “jakarta” and Executable choose the path of “isapi_redirector.dll”àOK

Note - If you check on its status, you may notice that the ISAPI filter hasn’t been successfully loaded at this stage, even if you have re-started IIS. This is expected behaviour and is documented in the IIS6 Operations Guide,

“In an effort to optimize resources in IIS 6.0, an ISAPI filter is not loaded until a request is made to a Web site that requires the ISAPI filter. Until this request is made, IIS Manager does not display the status of the ISAPI filter.”

However, once IIS has served a successful request to it you will see the status of the ISAPI filter change to ‘Loaded’.

5.       Create a virtual directory for the Tomcat connector to use, create a new Web Service Extension in IIS and then enable that web service extension so that it can be used.

Rigth click your websiteàNewàVirtual Directoryàset Alias: jakartaàNextàset Path: choose the path of “isapi_redirector.dll”.

6.       Create and exable the tomcat Web Service Extension

Rigth click “Web Service Extension” à Add a new Web service extension àSet name: Tomcat, set Required files:choose your “isapi_redirector.dll”à click the “Set extension status to Allowed”àOK

7.       Add the “.jsp”

Rigth click your websiteàPropertiesàHome DirectoryàMappingsàAddàset Executable: choose your “isapi_redirector.dll”, set Extension:  .jsp (Note: if there is blank space in your path, you need to make your path in Double quotes.)

8.       Set index.jsp as default content page

Rigth click your websiteàPropertiesàDocumentàAdd-->index.jsp

10. Restart tomcat and IIS. You should now be ready to test your Tomcat installation by issuing a request to the sample applications. Visit http://localhost

If show the page as , you’re successful.

 

转载地址:http://trici.baihongyu.com/

你可能感兴趣的文章
实现MAVROS与px4的自定义通讯功能(一)
查看>>
BUUCTF笔记之Web系列部分WriteUp(四)
查看>>
使用fastcoll生成字符串MD5碰撞
查看>>
2021GKCTF X DASCTF应急挑战杯部分Writeup
查看>>
图像量化函数
查看>>
Linux 服务器上搭建SVN服务端
查看>>
每天学一点python——GUI遍历文件夹
查看>>
小白也能看懂的Yolov4训练过程
查看>>
yolov4评估自己的模型
查看>>
Linux配置darknet训练yolov4模型
查看>>
基于深度学习图像分割的研究综述(1)
查看>>
Transformer加油站!
查看>>
异常检测(二)——MVTec AD -A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection
查看>>
异常检测(三):PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization
查看>>
Qt /INCLUDE:?warp_size@cuda@at@@YAHXZ
查看>>
Faster-RCNN网络详解
查看>>
Litorch+VS2017+Qt环境配置教程
查看>>
yolo训练精简版
查看>>
基于GB28181RTPoverTCP的发送程序拾遗
查看>>
Android入门知识要点
查看>>