Niocron
Niocron

Reputation: 67

IIS Application Request Routing Module 502.2

Task:

I have a server with one subdomain. On this subdomain, I want to run multiple Angular instances on different paths. For example:

My attempt:

  1. I added one site in the IIS for subdomain.bla.com
  2. I installed the Application Request Routing Module in IIS
  3. I added a reverse proxy rule for /app1 to localhost:401 and /app2 to localhost:402
  4. I added one site for app1 and one for app2

Problem

On my local machine, this works fine but on the live server I always get a HTTP error 502.2 Bad Gateway - There was a connection error while trying to route the request. I already tried it with ARR 2.5 and ARR 3. The only difference between local and live I could find is the IIS version (10 local, 8.5 live) but I can't update it on live (Windows Server 2012 R2). FYI: There are no errors in the event log.

The rule

<rule name="ReverseProxyInboundRule1" stopProcessing="true">
    <match url="app1/(.*)" />
    <action type="Rewrite" url="http://localhost:401/{R:1}" />
</rule>

Thanks in regards

Upvotes: 0

Views: 1354

Answers (1)

Niocron
Niocron

Reputation: 67

I found the answer by myself -> i forgot the "http://" in the rewrite rule"

Upvotes: 1

Related Questions