有人可以告诉我如何在以下 IIS-Tomcat isapiredirect(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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 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.