Nginx + IIS Reverse Proxy

Source: Internet
Author: User
Tags nginx reverse proxy

Simplifying topologies

Here we simply describe the process of the reverse proxy for the principle of description

Front-end Nginx Reverse proxy true IIS server

The Nginx reverse proxy configuration code is as follows. Here I only pick one of the servers, mainly in header, when the backend has only one IIS server and runs multiple virtual hosts.

server {        listen       ;        server_name  site1.cxsz.com;        #charset koi8-R;        #access_log  logs/host.access.log  main;         / {            proxy_redirect off;            Proxy_set_header host site1.cxsz.com;            Proxy_set_header x-real-ip $remote _addr;            Proxy_set_header x-forwarded- for $proxy _add_x_forwarded_for;            Proxy_pass http://192.168.110.137;         }

We visit and grab a bag.

Because the previous Nslookup parsing, so we first refresh client-side DNS, and note that the app takes the DNS order, first is the cache, hosts, files, and then the DNS of their own configuration

Let's grab the bag and see

We can see the host in the response header, which is the address of the backend IIS virtual server.

At this point, a simple reverse proxy setting succeeds

end!

Nginx + 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.