I have the following setup:-
IIS Server 7
domain : abc.xyz.com
virtual directory : abc.xyz.com/myapp/
NGINX Server
- 192.168.23.122
My requirement is to whenever someone opens abc.xyz.com/myapp/ it should point to NGINX IP internally but the URL in the address bar should be abc.xyz.com/myapp/ and further links and navigation within the application should happen.
- NGINX server is accessible from the IIS server using IP.
Current Web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyRuleForNginx" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(http?)://" />
</conditions>
<action type="Rewrite" url="{C:1}://192.168.1.105/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
I am hitting the url:
192.168.1.105 is a nginx server on other system which I am able to access from the IIS server.