IIS reverse proxy/rewrite/https Uninstall configuration

Source: Internet
Author: User

The target, which enables IIS to have similar features to Nginx, redirects requests for the specified domain name to other ports within IIS, outside of IIS, other machines, and implements the HTTPS offload feature

Key announcements:

1. Install the latest version of Urlrewrite(Microsoft-developed) plugin

2. Install the latest version of ARR plugin (application Request Routing)

3. Add Redirect Rule

4. Traffic: Extranet ==>iis==> Designated Website = = "urlrewrite==" arr== "Your target program URL

If you only forward to the Web site in IIS, arr is not required. If you want to forward to another program or machine, you must have arr

If you do not need HTTPS offload, you can configure the rules directly in the global.

==================== Text Split Line ====================

1. Materials

IIS (Windows Pro comes with, if it is a server edition system, it needs to be installed via feature Manager (no download required))

urlrewrite Plug-in, Https://www.iis.net/downloads/microsoft/url-rewrite

ARR Plugin (application Request Routing) https://www.iis.net/downloads/microsoft/application-request-routing. if you only forward to a Web site in IIS, you do not need arr

The above two plugins can be installed via webplatforminstaller Search

2. Installing plugins

Install the above two plugins, restart IIS Manager, and then click on the current host, you will find two new icons. If you don't see it, restart IIS, restart

3. Setting bindings

You can skip this step if HTTPS offloading is not required (that is, the external HTTPS traffic is forwarded to HTTP traffic).

Use the default site or create a new one. and set bindings such as

Set up ports and IPs as required.

Where host name is set to *

Why set to *, the goal is to have all traffic to the site. The specified traffic is then forwarded through Arr/rewrite.

If you understand the role of the hostname here, you can also set one or more of the specified domain names, such as www.example.com. This sets the forwarding time does not affect other sites, the disadvantage (and the advantage) is that only the traffic set up the domain name.


Note: HTTPS requires a self-signed certificate to be imported/created first and specified when the HTTPS binding is added. The icon for the import certificate is in the first image (server certificate/servercertificates).

4.ARR Settings ( arr is not required if forwarding only to IIS)

5. Add a forwarding rule.

Here to note:

    • There are two rules for the rule, one for IIS Manager, one for the host name, the other for the Web site. The scope of the two is self-explanatory, one is all traffic forwarding, and one is to only forward traffic to the specified site.
    • To implement HTTPS offloading, you must set up the rules in your Web site.

Site rules are used here, so you need to click on the site first, then double-tap open Urlrwrite

Add a blank rule

Fill in the required content

Fill it out and save it quickly.

6. Testing

At this point, start the Web site and start the 9000 port program. Browser input https://a.example.com, if the local debugging, need to configure the domain name in the hosts to go to the local to test OH.

If you use a self-signed certificate, you may be prompted that the site is unsafe because the issuer and target of the certificate are yourself, not a third-party trusted institution. You can download the certificate and then install it into a trusted certification authority. Open it again .

ARR also has a more interesting function, called reverse proxy grab, you can achieve the flow of the packet capture.

If you use Fiddler to do the reverse proxy monitoring the above port 8889, you can refer to Http://docs.telerik.com/fiddler/configure-fiddler/tasks/usefiddlerasreverseproxy

That is, in the Fiddler Script Find onbeforerequest This function, add the following sentence in the function can be

if (oSession.host.toLowerCase () = = "127.0.0.1:8889") Osession.host = "127.0.0.1:9000";//target server listener in 127.0.0.1 : 9000, you can see the details of the inbound traffic pack in fiddler.

  

IIS reverse proxy/rewrite/https Uninstall configuration

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.