有人可以告诉我如何在以下IIS-Tomcat isapiredirect(2.0)配置中路由请求?

时间:2012-02-01 04:09:58

标签: iis tomcat isapi-redirect

我有以下设置:

1。 Tomcat server.xml

<Server port="8005" shutdown="SHUTDOWN">

<Service name="Catalina">

<Connector port="8080"
maxHttpHeaderSize="8192" maxThreads="150" 
minSpareThreads="25" maxSpareThreads="75" 
useBodyEncodingForURI="true" enableLookups="false" 
redirectPort="8443" acceptCount="100" 
connectionTimeout="20000" disableUploadTimeout="true" />

<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />

<Connector port="8009" 
enableLookups="false" redirectPort="8443" 
protocol="AJP/1.3" />

2。 worker.properties

[channel.socket:localhost:8009]
info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol
tomcatId=localhost:8009

3。 IIS

Has a website with port 80 that have isapiredirect filter enabled.

我最初的客人是 “端口HTTP80-&gt; HTTP8009-&gt; HTTPS8443” “端口HTTP8080-&gt; HTTP8443”

1 个答案:

答案 0 :(得分:0)

您的AJP连接器(8009)不是HTTP,它使用AJP协议

如果客户端通过IIS连接,则流程将为

IIS Http80 - &gt; Tomcat AJP 8009 或通过Https IIS Https443 - &gt; Tomcat AJP 8009

据我所知,AJP13协议不支持将IIS中调用的数据加密到Tomcat通信,但您可以设置一个参数让tomcat知道前端Web服务器是HTTPS,以便request.isSecure()返回true

只有在直接连接到tomcat时才会使用tomcat上8080/8443上的连接器。