IIS7配置反向代理_目录_全站的详细步骤方法解析大全

  应用Application Request Routing在IIS7配置反向代理

  1.首先前往http://www.iis.net/extensions/ApplicationRequestRouting下载Application Request Routing,然后安装

  2.安装完后在IIS管理界面找到ARR配置菜单:Application Request Routing

 

  3.点击右测开启Proxy项:server proxy settings.

 

  4.打开配置界面 在Enable proxy前面打勾保存

  5.在站点下建立web.config保存代码

  iis7全站反向代理设置

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="safe" stopProcessing="true">
                    <match url="^(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="(.*)" ignoreCase="false" />
                    </conditions>
                    <action type="Rewrite" url="http://www.xx.com/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

  iis7二级目录反向代理设置

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="fxdl" stopProcessing="true">
                    <match url="^abc(.*)" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="(.*)" ignoreCase="false" />
                    </conditions>
                    <action type="Rewrite" url="http://www.d58.net/abc{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

 

posted @ 2018-12-03 14:22  secsafe  阅读(2681)  评论(0编辑  收藏  举报