Friday, 15 August 2014

asp.net - IIS AAR - URL Rewrite for reverse proxy - how to send HTTP_HOST -



asp.net - IIS AAR - URL Rewrite for reverse proxy - how to send HTTP_HOST -

trying utilize aar reverse proxy in front end of several end iis servers.

one public ip address assigned server running iis/aar

then outbound url rewrite rules setup redirect 1 of several end servers depending on hostname.

works somewhat, returns end servers default site (not 1 mapped hostname) looks host name (http_host) not getting passed proxy server end server.

(i've verified bypassing reverse proxy editing hosts , end server returns right site bound host header)

this illustration of rule (192.168.0.99 internal server, site.myco.com hostname)

<rewrite> <rules> <rule name="reverseproxyinboundrule1" stopprocessing="true"> <match url="(.*)" /> <action type="rewrite" url="http://192.168.1.99/{r:1}" /> </rule> </rules> </rewrite>

have tried putting sever variables so

<!-- guessing server.myco.com hard coded --> <servervariables> <set name="http_host" value="server.myco.com" /> </servervariables> <!-- guessing picked dynamically incoming request host header --> <servervariables> <set name="http_host" value="{http_host}" /> </servervariables>

but alas returns default binding - ideas?

this post has reply - modifying headers iis7 application request routing

need enable preservehostheader - can't see how in ui works

config -section:system.webserver/proxy /preservehostheader:"true" /commit:apphost

asp.net iis url-rewriting iis-7.5 arr

No comments:

Post a Comment