日期:2014-05-20  浏览次数:20721 次

tomcat部署网站
在公司的服务器上用同一个IP,一共部署了三个网站。 现在要分离一个出来用tomcat,但是访问的时候必须要要输入
http://www.chinahrlink.com:8080/index.html 象这样的全名才可以,一个字母错了都进不了网站。我修改了端口为80,这样的话它就直接进了IIS部署的其他网站。何解?

------解决方案--------------------
问题描述:
iis上发布了多个网站,其中之一要改为jsp,需要tomcat进行支持,但如果tomcat独立运行则原有域名端口已被iis占用。

问题解决:
使用tomcat connector(可从tomcat主页下载),简要配置步骤如下:
一、下载isapi_redirect.dll到$tomcat/bin/win32/i386/ (下载路径为http://mirror.x10.com/mirror/apache/tomcat/tomcat-connectors/jk /binaries/win32/ ,但该路径可能改变)

二、下载workers.properties和uriworkermap.properties到$tomcat/conf (下载路径为http://mirror.x10.com/mirror/apache/tomcat/tomcat-connectors/jk /source/jk-1.2.22/tomcat-connectors-1.2.22-src.zip 在解开压缩包中的conf目录中,只要workers.properties.minimal和uriworkermap.properties就好,具体如何配置这两个文件有在线文档,不过简单来说直接放那儿就好)

三、修改注册表,方法如下:
1、In the registry, create a new registry key named "HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0"
2、Add a string value with the name extension_uri and a value of /jakarta/isapi_redirect.dll
3、Add a string value with the name log_file and a value pointing to where you want your log file to be (for example c:\tomcat\logs\isapi.log).
4、Add a string value with the name log_level and a value for your log level (can be debug, info, error or emerg).
5、Add a string value with the name worker_file and a value which is the full path to your workers.properties file (for example c:\tomcat\conf\workers.properties)
6、Add a string value with the name worker_mount_file and a value which is the full path to your uriworkermap.properties file (for example c:\tomcat\conf\uriworkermap.properties)

四、在iis中需要更改的站点上右键选择“新建->虚拟目录”,一定要取名为jakarta,然后制定$tomcat/bin/win32/i386/为目录地址,并且要在“执行(isapi...)上打勾”;

五、在该网站属性中,选择“ISAPI筛选器”,加入一个筛选器,取名为“tomcat”(这个随便),选择可执行的isapi_redirect.dll的路径。

六、重启整个iis服务,看见筛选器“tomcat”前面是绿箭头表示配置成功。

详细配置请见:http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
------解决方案--------------------
默认情况下,iis占用了80端口,如果你要用tomcat发布你的项目可以参考
http://xiaoyuzq-vip.blog.163.com
------解决方案--------------------
太简单了。

卸载IIS 。
tomcat 端口调整到80端口。
项目放到 ROOT文件夹下。

直接访问你的http://www.chinahrlink.com 就ok

一回生
二回熟
给分是朋友!

------解决方案--------------------
用apache
需要用tomcat的用jk或者ajp连接