火龙线 发表于 2024-11-26 22:29:58

解决 Discuz! X3.5 IIS 中的 WebSocket https 反向代理问题

本帖最后由 火龙线 于 2024-11-27 13:39 编辑


需要用到两个IIS 插件 分是 URL重写 和 Application Request Routing Cache
1.需要在 web.config 中的 URL重写 规则中加入下面这个代码就行。

                <rule name="wss" enabled="true" stopProcessing="true">
                  <match url="^(.*?)/?wss(.*)$" />
                  <action type="Rewrite" url="{C:1}://localhost:8282/{R:2}" />
                  <conditions>
                        <add input="{CACHE_URL}" pattern="(.+)s://" />
                        <add input="{CACHE_URL}" pattern="(.*)s://" />
                  </conditions>
                </rule>可以,使用 URL重写-加添-空白规则
模式 输入
^(.*?)/?wss(.*)$"


操作类型:重写
URL下面的代码,8282为通信端口

{C:1}://localhost:8282/{R:2}




2.除此之外还要安装Application Request Routing Cache
http://www.iis.net/downloads/microsoft/application-request-routing








页: [1]
查看完整版本: 解决 Discuz! X3.5 IIS 中的 WebSocket https 反向代理问题