您的位置:首页 > 运维架构 > Tomcat

IIS与TOMCAT的整合

2015-06-01 17:30 633 查看
前提:IIS tomcat各自能够独立正常运行

第一步:下载isapi_redirect
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.14/isapi_redirect-1.2.14.exe
第二步:直接安装,注意选取合适的安装目录,最好在你的tomcat根目录下面,这样便于管理。

第三步:配置config文件夹下面的 “uriworkermap.properties” 文件。

# uriworkermap.properties - IIS

#

# This file provides sample mappings for example wlb

# worker defined in workermap.properties.minimal

# The general syntax for this file is:

# [URL]=[Worker name]

#只修改下面一处,其他不用修改

#最简单办法就是配置成下面这样,全部由tomcat解析

#记住 “=” 号后面的 “wlb”,需要在tomcat里面指定

/*=wlb

# Optionally filter out all .jpeg files inside that context

# For no mapping the url has to start with exclamation (!)

#!/servlets-examples/*.jpeg=wlb

#

# Mount jkstatus to /jkmanager

# For production servers you will need to

# secure the access to the /jkmanager url

#

/jkmanager=jkstatus

第四步:修改tomcat conf文件夹下面的server.xml

找到“<Engine defaultHost="localhost" name="Catalina" jvmRoute="wlb">” \\ 红色部分为添加内容,对应上面的“wlb”

增加网站:

<Host name="www.name.cn" debug="0" appBase="D:\tomcat7\webapps\name1" unpackWARs="true" autoDeploy="true">

<Context path="" docBase="" debug="0" reloadable="true"/>

</Host>

至此就剩下IIS还没配置了。

第五步:配置IIS 这里就不再赘述,网上搜一搜一大把。

说明:有些网上说法是要配置”workers.properties.minimal“文档,将 localhost 改成目标域名,还有就是tomcat里面server.xml文件将defaultHost改成目标域名。

但是在配置中总会出现问题,无法访问或者IIS提示权限不够等。我的思路是先按照默认配置,使tomcat能够被http://localhost/访问,然后再去进行一步步优化修改,这样就可以知道哪一步有错误。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: