Lo tengo tal y como dices, y he seguido los mismo pasos.
SERVIDOR PRINCIPAL (192.168.10.120):
- IIS + ARR
SERVIDOR SECUNDARIO (192.168.10.121
- IIS
No habÍa visto lo de las variables.
Este es mi web.config
Código:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="j2appview.dns.net" stopProcessing="true"> <match url="(.*)" /> <action type="Rewrite" url="http://192.168.10.121//{R:1}" /> <conditions> <add input="{HTTP_HOST}" pattern="http://j2app.viewdns.net/" /> </conditions> <serverVariables> <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" /> <set name="HTTP_ACCEPT_ENCODING" value="" /> </serverVariables> </rule> </rules> <outboundRules> <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1"> <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^http(s)?://192.168.1.120/(.*)" /> <action type="Rewrite" value="http{R:1}://http://j2app.ddns.net/{R:2}" /> </rule> <rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding"> <match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" /> <action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" /> </rule> <preConditions> <preCondition name="ResponseIsHtml1"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /> </preCondition> <preCondition name="NeedsRestoringAcceptEncoding"> <add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" /> </preCondition> </preConditions> </outboundRules> </rewrite> </system.webServer> </configuration>
Código:
<conditions> <add input="{HTTP_HOST}" pattern="http://j2app.viewdns.net/" /> </conditions> <serverVariables> <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" /> <set name="HTTP_ACCEPT_ENCODING" value="" /> </serverVariables>
Dejar un comentario: