I
I
Igor Tkhorik2019-05-08 04:32:40
IIS
Igor Tkhorik, 2019-05-08 04:32:40

How to host multiple web applications on IIS?

Good afternoon, on IIS 10 I placed several demo applications asp.core 2.1 on ports 5000 and 5003 and also registered domains for them. When forwarding port 80 from Mikrotik (action dst-nat; to-adress 192.168.1.10; to-ports: 5000-5010), only one site is available, the second one sends HTTP Error 400 in response. The request hostname is invalid. Bindings in IIS are on each web site, and if you separately forward them to each site, then they work. How to configure IIS so that when ports are forwarded (from port 80 to 192.168.1.10:5000-6000), all sites hosted on it work. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
chupasaurus, 2019-05-08
@habcerga1

Port mapping doesn't work that way. You need to make an empty site in IIS on a separate port, in which to make URL Rewrite rules with the Revesre Proxy type to your applications, and NAT port 80 on the router to this site.

N
NewDevLab, 2019-05-08
@NewDevLab

Forward one port, and in IIS there are several sites on one IP and one port (for example, 192.168.1.10:80). But with different hostnames. In the IIS logs, you need to look to save the real IP of external users, and not the IP of Mikrotik (if necessary).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question