iis-Reverse Proxy

Source: Internet
Author: User
Tags servervariables

Test environment: WINDOWS10, iis/10.0

1. Install arr, url Rewrite (URL rewrite tool 2.0)

Note the correspondence between English and Chinese environment:

    Application request Routing for Chinese application demand routing

    URL Rewrite Module corresponds to Chinese URL rewrite

Download Install arr (you can also search for "arr" in the search box in IIS Manager, Web Platform Installer, products--), Application Request Routing 3.0 beta-> Add, install): http://www.iis.net/ Downloads/microsoft/application-request-routing

Download Install URL Rewrite Module (you can also search for "url" in the Search box in IIS Manager, products--, web Platform installer,->url Rewrite tool 2.0-> Add):/http www.microsoft.com/en-us/download/details.aspx?id=7435

When the above installation is complete and reopen IIS Manager, you can see the following

2. Enable arr: Double click arr (Application Request Routing), click on the right server Proxy settings...-> select Enabel proxy-> click on the right "app"

3. Enable URL rewriting, which can be configured via Web. config or through interface settings (Web. config can eventually be viewed and manipulated using the interface ), such as the Web. config sample,

At this time Www.che.com/che or www.che.com/che/xxxx are agents to www.proxy.com or www.proxy.com/xxx, if you do not want to filter out "Che", only need to change the match url "^ (che (/?|. *))$"

<?XML version= "1.0" encoding= "UTF-8"?><Configuration>    <system.webserver>        <rewrite>            <rules>                <Rulename= "Cheproxy"stopprocessing= "true">                    <MatchURL= "^che" (/?|. *)$" />                    <conditions>                        <Addinput= "{http_host}"pattern= "Www\.che\.com" />                    </conditions>                    <Actiontype= "Rewrite"URL= "Http://www.proxy.com{r:1}" />                    <ServerVariables>                        <Setname= "Http_x_forwarded_host"value= "{http_host}" />                    </ServerVariables>                </Rule>            </rules>        </rewrite>    </system.webserver></Configuration>

Due to the use of variable http_x_forwarded_host, you need to add http_x_forwarded_host, add-on, view server variables, URL rewriting

iis-Reverse Proxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.