IIS7 IIS8 reverse proxy rule writing, installation and configuration method

IIS7 IIS8 reverse proxy rule writing, installation and configuration method

Purpose: Treat Station A as the secondary directory of Station B

like:

http://www.baidu.com is equal to /baidu/

http://www.qq.com is equal to http://www.6ke.com.cn/qq/

1. Install 64-bit URL IIS7 rewrite
2. Install requestRouter_amd64.msi

Installation Steps

1. The version of IIS is 7.5.7600.16385.

2. Close related services.

net stop was /y

net stop wmsvc /y

The second service is not turned on.

3. Manually install ARR dependencies.

a) Web Farm Framework module version 1.1

b) External cache module version 1.0

c) URL Rewrite module version 2.0

4. Install ARR.version 3.0

5. Start the service that was previously shut down.

net start was

net start wmsvc

6. Installation successful.

Problems encountered:

Previously installed using WebPI. It will automatically install ARR3.0 related dependencies. Server Farm can be displayed normally, but ARR3.0 is not installed successfully. Checking the system log shows: Failed to load file or assembly:

Solution:

Uninstall all the automatically installed arr and its dependencies. Follow the above steps to install manually.

3. Save the following rules in Notepad and rename them to web.config.

The above files can be downloaded from https://www.jb51.net/softs/629246.html

Put the website root directory:

<?xmlversion="1.0"encoding="UTF-8"?> 
  <configuration> 
  <system.webServer> 
  <rewrite> 
  <rules> 
  <rulename="OrgPage"stopProcessing="true"> 
  <matchurl="^baidu(.*)$"/> 
  <actiontype="Rewrite"url="http://www.baidu.com/{R:1}"/> 
  </rule> 
  <rulename="OrgPage4"stopProcessing="true"> 
  <matchurl="^qq(.*)$"/> 
  <actiontype="Rewrite"url="http://www.qq.com/{R:1}"/>
   </rule>
   </rules>
   </rewrite>
   <defaultDocument>
   <files>
   <clear/>
   <addvalue="index.html"/>
   <addvalue="1.html"/>
   <addvalue="index.php"/>
   </files>
   </defaultDocument>
   </system.webServer>
   </configuration>

4. Find aRR and click it as shown below.

Code Explanation:

<rulename="You can write it at will, but it must not have the same name"stopProcessing="true">
<matchurl="^website local secondary directory name (.*)$"/>
<actiontype="Rewrite"url="The called website or the called website's secondary directory name {R:1}"/>
</rule>

It's done!

Steps to add reverse proxy in IIS6 and 7

1. Install requestRouter_amd64.msi and rewrite_x64_zh-CN.msi.

2. Open IIS and select Application Request...

IIS6,IIS7,反向代理

3. Select Server Proxy Settings. . .

IIS6,IIS7,反向代理

4. Check Enable proxy and click Apply on the right.

IIS6,IIS7,反向代理

5. Select the site that needs reverse proxy, and then select URL rewrite.

IIS6,IIS7,反向代理

6. Click Add Rule

IIS6,IIS7,反向代理

7. Select Blank Rule

IIS6,IIS7,反向代理

8. Fill in the form as shown below

IIS6,IIS7,反向代理

9. Fill in the form as shown below

IIS6,IIS7,反向代理

10.Continue to fill in the form according to the diagram

IIS6,IIS7,反向代理

11. You are now done.

IIS6 is relatively simple, the steps are as follows:

1. Download and install Rewrite3.

2. Modify the ".htaccess" file appropriately and put it in the root directory of the website.

You may also be interested in:
  • How to set the cookie domain when IIS implements reverse proxy
  • Windows installs nginx1.10.1 reverse proxy to access IIS website
  • How to configure reverse proxy using IIS (picture and text)
  • IIS defense against small-scale DDOS attacks (reverse proxy)
  • Graphical tutorial on how to configure reverse proxy using Application Request Routing in IIS7
  • Let iis record the real ip of nginx reverse proxy
  • Nginx reverse proxy + DNS polling + IIS7.5 10 million PV 1 million IP dual-line website architecture case
  • Detailed explanation of ISAPI_Rewrite Full version used in IIS as reverse proxy

<<:  Analysis of the Principle of MySQL Index Length Limit

>>:  JavaScript Canvas draws dynamic wireframe effect

Recommend

How to set the memory size of Docker tomcat

When installing Tomcat in Docker, Tomcat may over...

About input file control and beautification

When uploading on some websites, after clicking t...

In-depth explanation of slots and filters in Vue

Table of contents Slots What are slots? Slot Cont...

Sample code for implementing multi-application deployment using tomcat+nginx

Table of contents Multi-application deployment 1-...

Install Windows Server 2019 on VMware Workstation (Graphic Tutorial)

If prompted to enter a key, select [I don’t have ...

Negative distance (empathy) - iterative process of mutual influence

Negative distance refers to empathy. Preface (rai...

MySQL 8.X installation tutorial under Windows

I had been using MySQL 5.7 before, but because My...

HTML tag default style arrangement

html, address,blockquote,body, dd, div,dl, dt, fie...

...

Detailed explanation of formatting numbers in MySQL

Recently, due to work needs, I need to format num...

Solution to the problem that Docker cannot stop or delete container services

Preface Today, a developer gave me feedback that ...

Notes on element's form components

Element form and code display For details, please...

Detailed explanation of CSS3 flex box automatic filling writing

This article mainly introduces the detailed expla...

What is the function and writing order of the a tag pseudo class

The role of the a tag pseudo-class: ":link&qu...

How to use an image button as a reset form button

When we make a form, we often set a submit button ...