Using IIS7 as a reverse proxy

iis-7reverse-proxy

My question is pretty much identical to the question listed but they did not get an answer as they ended up using Linux as the reverse proxy.

Using IIS7 as a reverse proxy

I need to have IIS the main site and linux (Apache) being the proxied site(s).

so I have

site1.com (IIS7)
site2.com (Linux Apache)

they have subdomains of

sub1.site1.com
sub2.site1.com

sub3.site2.com

I want all traffic to go to site1.com and to say anything that is site2.com should be proxied to linux box on internal network, (believe ARR can do this but not sure how).

I can not have it running as Apache doing the proxying as I need IIS exposed directly.

any and all advice would be great.

EDIT

I think this might help me:

<rule name="Canonical Host Name" stopProcessing="true">    
    <match url="(.*)" />    
    <conditions>    
        <add input="{HTTP_HOST}" negate="true" pattern="^cto\.com$" />  
        <add input="{HTTP_HOST}" negate="true" pattern="^antoniochagoury\.com$" />   
        <add input="{HTTP_HOST}" negate="true" pattern="www.antoniochagoury\.com$" />   
    </conditions>    
    <action type="Redirect" url="http://www.cto20.com/{R:1}" redirectType="Permanent" />    
</rule>  

from: http://www.cto20.com/post/Tips-Tricks-3-URL-Rewriting-Rules-Everyone-Should-Use.aspx

I will have a look at this when I have access to the IIS7 box.

Thanks

Best Answer

I swear this has been answered several times already.

You need to add two pieces of software to IIS to use it as a reverse proxy: URL rewrite and application request routing (ARR). Both can be downloaded from the IIS web site.

The documentation to get you started can be found there.

Related Topic