'Trying to deploy my nodejs api using reverse proxy method but getting error:
I'm trying to deploy my nodejs api on IIS by reverse proxy method but getting error: HTTP Error 400.605 - Bad Request The request cannot be routed because it has reached the Max-Forwards limit. The server may be self-referencing itself in request routing topology.
The steps i have followed: 1- Created new website on IIS 2- Added a new rule with reverse proxy(Added my hostname i.e localhost:8099 for now) 3- Installed pm2 to running my website constantly
my web.config after rewrite rule:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8099/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Solution 1:[1]
So you mean that you access the new site through port 8099 and its proxy rule forward request to http://localhost:8099/{R:1} ?
If so, please change the binding of the site to other port,or add another binding for it but not use 8099 port, or the target url of proxy rule to other port.
This error is caused by original request and forward request both request for 8099 port.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Bruce Zhang |
