IIS 7 Reverse Proxy, share 1 IP with multiple webservers
Found a need for a reverse proxy. What is that you ask??? A regular proxy server or “forward proxy” can be used to forward HTTP traffic from a network’s clients to external web servers on the Internet. The proxy can also cache popular sites to save on bandwidth also, so all CNN.com’s images would be loaded once and everyone who visits the page afterwards can use images off the local proxy server instead of downloading off the internet.
A reverse proxy would allow you to have 1 IP address and multiple webservers behind it. According to Wikipedia :”A reverse proxy is a proxy server that is installed in a server network. Typically, reverse proxies are used in front of Web servers. All connections coming from the Internet addressed to one of the Web servers are routed through the proxy server, which may either deal with the request itself or pass the request wholly or partially to the main web servers.”
At LW, with our virtual environment, we’re able to setup multiple test boxes for all our different client environments, but right now we still have 1 IP address, thus the need for a reverse proxy. Searching the internet for something that works properly and is inexpensive, I found that IIS has a module called Application Request Routing (ARR) and URL rewriting which when combined give you the reverse proxy functionality. To download the modules, you can find them here: ARR, URL rewriter
here’s the basic steps in IIS 7 to setup which were found here:
“For a very simple reverse proxy, all you have to do is:
1. Select the server node on inetmgr.
2. Double click on Application Request Routing icon.
3. Select/check “Enable proxy”.
4. Select/check “Use URL Rewrite to inspect incoming requests.
5. Enter the server of where you want to route the request to in “Reverse proxy” – ie. (myserver.contoso.com).
In above example, all requests that are received by ARR will be routed to myserver.contoso.com.”
There’s also a great video walkthrough by Ruslan Yakushev(his accent is pretty thick) that really shows you how to use the modules properly, it’s located here