快速整合TOMCAT6.0.14+IIS6.0 不需要写什么注册表

时间:2022-09-04 16:27:43

软件环境:IIS6.0 + tomcat6.0.14 + Jakarta_Isapi_Redirector(附件)

一、ISPAI

1、下载附件中的 isapi_redirect-1.2.14.exe并安装,安装路径选在tomcat主目录下  起名isapi   之后进入该目录下conf目录,修改uriworkermap.properties(直接粘贴过去就行) 
      # uriworkermap.properties - IIS
      #
      # This file provides sample mappings for example jth
      # worker defined in workermap.properties.minimal
      # The general syntax for this file is:
      /jsp-examples/*=jth
      /servlets-examples/*=jth

      # Optionally filter out all .jpeg files inside that context
      # For no mapping the url has to start with exclamation (!)

      !/servlets-examples/*.jpeg=jth

      #
      # Mount jkstatus to /jkmanager
      # For production servers you will need to
      # secure the access to the /jkmanager url
      
# [URL]=[Worker name]
      #[请求路径]=[过滤器名称]

      #
      /jkmanager=jkstatus
      /oraa=jth
      /oraa/*=jth
      /*.jsp=jth 

2、配置conf\workers.properties.minimal(若相同可不变)
      # workers.properties.minimal - 
TOMCAT 
      #
      # This file provides minimal jk configuration properties needed to
      # connect to Tomcat.
      #
      # The workers that jk should create and work with
      #

      worker.list=jth,jkstatus

      #
      # Defining a worker named ajp13w and of type ajp13
      # Note that the name and the type do not have to match.
      #
      worker.ajp13w.type=ajp13
      worker.ajp13w.host=localhost
      worker.ajp13w.port=8009

      #
      # Defining a load balancer
      #

      worker.jth.type=lb
      worker.jth.balance_workers=ajp13w

      #
      # Define status worker
      #

      worker.jkstatus.type=status

二、TOMCAT
      server.xml:
            <Host name="
www.baidu.com"  appBase="G:/web"
                  unpackWARs="true" autoDeploy="true"
                  xmlValidation="false" xmlNamespaceAware="false">
                  <Context path="" docBase="baidu" debug="0" reloadable="true"/>  
            <Host>
      例子:
            <Host name=域名  appBase=虚拟路径
                  unpackWARs="true" autoDeploy="true"
                  xmlValidation="false" xmlNamespaceAware="false">      
                  <Context path="" docBase=文件夹名 debug="0" reloadable="true"/>
            </Host>

三、IIS6.0配置(重点)
1.新建网站,名称随意(完全不用新建,使用默认网站即可)
      
【网站IP地址】:(全部未分配)
      【此网站的主机头】:域名(同tomcat\conf\server.xml<Host>标签的"name"属性中的域名相同)      
      【网站主目录路径】:虚拟路径+文件夹名(tomcat\conf\server.xml<Host>标签的"appBase"属性中的虚拟路径加上<Context>子标签的"docBase"属性的文件夹名),
勾选【允许匿名访问网站】
      【允许下列权限】: 读取、运行脚本、
执行
2.在此网站下建立虚拟目录  名称:jakarta(必须)
      【路径】: tomcat路径\isapi\bin (isapi_redirect.dll的目录)
      【允许下列权限】:
读取、运行脚本、执行
3.网站-->右键-->属性: (注意:是网站而不是下面的默认网站)
      1)【ISAPI筛选器】-->添加-->
            【筛选器名称】: jakarta
            【可执行文件】: isapi\bin\isapi_redirect.dll (isapi_redirect.dll文件)
      2)【主目录】-->【执行权限(p)】:选择【脚本和可执行文件】-->配置-->添加-->
            【可执行文件】:isapi\bin\isapi_redirect.dll (isapi_redirect.dll文件)
            【扩展名】: .jsp.do 确定并且包括
子目录jakarta
      3)【文档】:-->添加-->【默认内容页】:比如index.html(对应网站默认首页) -->确定
      4) Web服务扩展-->右键-->添加一个新的Web服务扩展:
            【扩展名】:
jakarta(必须)
            【要求的文件】: isapi\bin\isapi_redirect.dll (isapi_redirect.dll文件)
            勾选【设置扩展状态为允许】 保存
      5) 最后重启tomcat及IIS,经过多次测试全部正确,若中间出现问题 
          
测试方法: 可先将tomcat\conf\server.xml中的<HOST>标签的name属性改为localhost
          然后在IIS中右键单击网站点选【属性】-->【网站】选项卡中的【IP地址】栏后面的【高级】按钮
          将网站的主机头改为空,端口为80
      6) 再重启tomcat及IIS, 本地访问
http://localhost/ 若成功 说明配置正确 问题可能出在域名上

      

      Jakarta_Isapi_Redirector(下载地址):   http://download.csdn.net/detail/martin_94/5526139