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

发布于 2024-12-29 23:24:18 字数 1139 浏览 2 评论 0原文

我有以下设置:

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->HTTP8009->HTTPS8443” “端口HTTP8080->HTTP8443”

I have the following settings:

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.

My initial guest is
"port HTTP80->HTTP8009->HTTPS8443"
"port HTTP8080->HTTP8443"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼睛会笑 2025-01-05 23:24:18

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

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

IIS Http80 ->雄猫 AJP 8009
或通过 HTTPS
IIS HTTPS443-> Tomcat AJP 8009

据我所知AJP13协议不支持对IIS与Tomcat通信涉及的数据进行加密,但是可以设置一个参数让tomcat知道前端web服务器是HTTPS,这样request.isSecure()就返回true 。

仅当您直接连接到 tomcat 时,才会使用 tomcat 上的 8080/8443 上的连接器。

Your AJP Connector (8009) is not HTTP, it uses the AJP protocol

If a clients connects via IIS, the flow will be

IIS Http80 -> Tomcat AJP 8009
or via Https
IIS Https443 -> Tomcat AJP 8009

As far as I know the AJP13 protocol does not support encryption of the data involed in IIS to Tomcat communications, but you can set a parameter to let tomcat know that the front webserver is HTTPS so that request.isSecure() returns true.

Your connectors on pour 8080/8443 on tomcat will only be used if you connect directly to tomcat.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文