
IIS 뒤에 Java 앱 서버로 Tomcat을 설치했습니다. 다음 규칙을 사용하면 정적 페이지를 잘 다시 작성할 수 있지만 아쉽게도 웹소켓 연결은 설정되지 않습니다.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<webSocket enable="false"/>
<rewrite>
<rules>
<rule name="Redirect HTTP to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/foo/{R:1}" redirectType="SeeOther" />
</rule>
<rule name="Redirect from IIS to Tomcat" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{CACHE_URL}" pattern="^(.*)://" />
</conditions>
<action type="Rewrite" url="{C:1}://tomcat.contoso.com/foo/{R:1}" />
</rule>
</rules>
<outboundRules>
<rule name="Redirect from Tomcat to IIS" preCondition="ResponseIsHtml">
<match filterByTags="A, Form, Img" pattern="^(.*)://tomcat.contoso.com/foo/(.*)" />
<action type="Rewrite" value="{R:1}://apps.contoso.com/foo/{R:2}" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
이거 성공하신 분 계신가요? URL 재작성은 웹소켓(ws:// & wss://) 역방향 프록시도 지원합니까?