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