How to implement reverse proxy using iis7 arr modulo

Source: Internet
Author: User
Tags microsoft iis

Iis7Arr(Application request
The routing module is 「Very powerful"Website tool, today I took a moment to study and successfully set the reverse proxy mechanism, because it is really difficult for beginners to get started with arr, even if
Regular Expression experienced it personnel may encounter many obstacles to successful setting. If they have never used URL rewrite or do not know reverse proxy, it is difficult to get started, so today I will share a complete installation and setup process.

Install the application Request Routing 1.0 Module

1. Use Microsoft Web platform installer to install application
Request Routing 1.0 Module

2. the preset URL rewrite will be associated
And other necessary components will also be installed automatically.

Then pressI acceptIt will be automatically installed.

3. If the installation is successful, the following figure is displayed:


Enable IIS administrator settings

1. Check whether the module is correctly installed. Click "server node" and check IIS
The section contains the application Request Routing and URL rewrite modules.

2. Apply Request Routing
Set, enable proxy, and uncheck"Reverse rewrite host in Response Headers"Option, and then click the" Apply "button on the right. Other Default values do not need to be modified. After this step is fixed, IIS must be restarted to take effect.

3. Set the URL rewrite
Module is also the highest entry threshold. First, we add a new set of rules (add rules)

4. Add rule with rewrite Map
The window sets a set of rewritemap names. You can manually enter them, but do not use blank or special characters for the names! Here we manually set the name to reverseproxymap

5. Let's add a few new reverse proxies.
Corresponding table, the rewrite map here is a set of very simple key/value values. My purpose is to correspond to the http_host header value of the HTTP request and translate it into another URL, to achieve the purpose of reverse proxy.

6. Click Back to rules.
Prepare to modify the main settings of URL rewrite.

7. Then, in the preset rewrite rule1 for reverseproxymap
Right-click the rule to edit it)

8. Most of the preset settings here are not what we need, in order to achieve reverse proxy
The condition and action parameters must be modified.

9. Modify Conditions
Parameter to change the default parameter. You only need to change the condition input to {reverseproxymap: {http_host.

 

10. Finally, we set the action
Change the rewrite URL of the section to http: // {C: 0}/{R: 0}, check append query string, and stop processing ofsubsequent
Select rules and click 「ApplyThat's all!

 

---

Finally, the test http: // 192.168.2.253/obtained web page is the http://www.miniasp.com/web page content, also explicitly conforms
Reverse Proxy requirements.

Next, I added a rewrite map entry. In original value, I set it to testarr (this is a non-existent domain, so I set this record in my hosts file on my local machine ), set the new value to another website URL.

Test successful! For example, the web page I link to http: // testarr/is the content of the http://www.yam.com/web page!

---

Reverse Proxy onlyArr(Application
An Application of the Request Routing module. In fact, arr can do many things, such as organizing server farms and implementing HTTP load balance (Layer
7) implement external cache and even use NLB to provide high availability and scalability website environments.

In the past, to implement these mechanisms, we had to spend a lot of money to purchase hardware or high-price products. There were also a lot of free products, but we had to fight against extremely complex configuration files! Now we have arr
This free Buddhist heart-level module is no longer afraid of high-traffic website demands.

Although arr is not well set at the beginning, when you understand the architecture, concepts, and settings of ARR, you will find out how nice it is to have a GUI.

Related Links

  • Using the application Request Routing module
  • Microsoft IIS 7.0-application Request Routing (ARR)
    Online discussion area
  • Using URL rewrite Module
  • URL rewrite module configuration reference
  • Reverse Proxy
  • Application Request Routing Version 2
  • Modifying HTTP Response Headers
  • Reverse proxy with URL rewrite V2 and application request
    Routing

 

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.