Apache与IIS转发请求

在Apache中, 解析域名转发请求: VIRTUAL HOST

ProxyRequests Off
ProxyVia Off

<Proxy *>
     Require all granted
</Proxy>

ProxyPass / http://localhost:8181/
ProxyPassReverse / http://localhost:8181/

在IIS中新建网站后, 配置web.config

<rewrite>
    <rules>
        <rule name="ReverseProxyInboundRule1" stopProcessing="true">
            <match url="(.*)" />
            <action type="Rewrite" url="http://localhost:8181/{R:1}" />
        </rule>
    </rules>
</rewrite>

Leave a Comment