iis和tomcat结合使用,让IIS发布的应用也能访问到JSP

最近因为结合客户端要对服务端做些配置,查了一些资料,下面老外写的IIS和TOMCAT结合使用的方法挺不错的,如果大家有用得到的可以看看,最后面有原始的连接地址。

 

Tomcat and IIS Installation process (jk2).


This would be my way of configuring the JK2 redirector to work as quickly and simple as possible.

First of all, download the component needed to do the connection isapi_redirector2.dll
Note : replace $tomcat_home with your tomcat installation directory, e.g. "C:/jakarta-tomcat-4.1.24".

Now, create the workers2.properties file where you define the worker "main".

[shm]
file=$tomcat_home/logs/jk2.log
size=1048576

# Example socket channel, override port and host.
[channel.socket:reynir_net:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:reynir_net:8009]
channel=channel.socket:reynir_net:8009

# Uri mapping
[uri:/*.jsp]
[uri:/web/*]
[uri:/view/*]
worker=ajp13:reynir_net:8009

# define the worker
[status:status]

# Uri mapping
[uri:/jkstatus/*]
worker=status:status

 


Save this file into c:/$tomcat_home/conf/workers2.properties
You will also need jk2.properties, the only line I've got in my file is like this :

request.tomcatAuthentication=false

 

This line is to make IIS take care of authentication, rather than tomcat.
You can also set up an realm in tomcat and this value true and tomcat will take care of http authentication.
Save this file into c:/$tomcat_home/conf/jk2.properties

You need to create a registry mergable file such as the one below , and merge it into the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/2.0]
"serverRoot"="$tomcat_home"
"extensionUri"="/jakarta/isapi_redirector2.dll"
"workersFile"="$tomcat_home//conf//workers2.properties"
"logLevel"="DEBUG"

 

You must be sure these values are correctly spelled, and you must check if these files exist. Ok, now you must open the Internet Information Server Management Console, accessable through:
- [start]->settings->control panel->Administrative tools->Internet Services Manager
Select the Host you are working with.
"Right click" it and open it's properties dialog.
Select the ISAPI Filters tab.
Click Add
type in filtername : jakarta
type in Executable : $tomcat_home/conf/connector/isapi_redirector2.dll (or browse to it).

click OK.
Next create a new virtual directory, named jakarta. It's "Local path" should be C:/$tomcat_home/conf/connector
Now, open the services dialog (from control panel-> administrative tools -> services).
restart the "World Wide Web Publishing Service".
now go back to the Internet service manager, and check if the arrow in the ISAPI Filter dialog has turned green.
If it has not turned green one or more of the paths in the registry-file you merged to the registry (in above step) is incorrect.
You must run regedit (from start -> run -> regedit) and browse to HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/2.0.
Now review the paths, the redirector not finding the configuration files is the only reason for a red arrow.

Problems that have occured, are not big, probably the biggest is the fact that I've never got any errors or debug info in the logfile.  

 

 

The original URL:  http://www.reynir.net/tomcat/tomcat_IIS_service_jk2.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值