IIS仅将一个站点重新路由到Apache

时间:2020-01-13 21:57:41

标签: iis url-rewriting

我试图弄清楚如何仅将我们的一个站点从IIS重新路由到Apache。我已经关注了一些在线教程和帖子,但没有任何效果。我不断得到: enter image description here

我已阅读到我需要使用IIS的URL重写功能进行反向代理。所以我做到了,这是我的设置:

    <?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpRedirect enabled="false" destination="" />
        <rewrite>
            <rules>
                <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://localhost:8088/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Apache在8088上,如果我按localhost:8088,它就可以正常工作。我还将IUSRIIS_IUSRS用户添加到具有读取和执行,列出内容和读取权限的目录权限中。我认为这不会那么难。

1 个答案:

答案 0 :(得分:1)

当您需要将IIS重写为apache时,请记住安装ARR。 https://www.iis.net/downloads/microsoft/application-request-routing

然后请记住启用服务器节点->应用程序请求路由缓存->服务器代理设置->启用代理。

enter image description here

此外,您是否可以在不使用URL重写规则的情况下访问orchestrator.local。因为,如果此问题是由IIS引起的,则您应该收到的状态代码多于无法访问站点的次数。