how to I get IIS to point to its localhost 5003 so it is accessible for a app which is running inside a container

Swapneswar Mohapatra 20 Reputation points
2023-04-11T13:09:57.7266667+00:00

I have a api application hosted in Docker .net core runtime 7.0 image. The api application is accessible on the Windows Server 2019 VM via localhost:5003/swagger. The same VM has IIS running multiple sites, e.g. scuser.easyfast.com. This existing IIS site has certificates and security set up and is hosting and running the production site. I need to bind scuser.easyfast.com/swagger to (on the same host) localhost:5003. I’m used to go into IIS, basic settings, and point to a physical path. My question is how to I get IIS to point to its localhost 5003 so it is accessible from swagger url mentioned? There is no physical path to a file structure anymore.

Internet Information Services
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,635 questions
{count} votes

Accepted answer
  1. Lex Li (Microsoft) 5,322 Reputation points Microsoft Employee
    2023-04-11T19:09:48.8466667+00:00

    Since you already has a site with the desired site binding to process HTTP requests at scuser.easyfast.com. Then please install ARR and add reverse proxy rules to forward /swagger to localhost:5003, and that's how people usually solve the challenge in the past decade, https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing


0 additional answers

Sort by: Most helpful