locked
How to use IIS Reverse Proxy to .net core application ? RRS feed

  • Question

  • User-235226130 posted

    Hi

    How to setup iis reverse proxy (like nginx and apache) to .net core application ? 

    for example http://192.168.1.1:80 ---->  http://192.168.1.1:5000

    not use .Net Core Windows Server Hosting , just ip reverse proxy, thanks

    Wednesday, December 18, 2019 8:15 PM

All replies

  • User-474980206 posted

    first you install the  AAR package

      https://www.iis.net/downloads/microsoft/application-request-routing

    then you create a site, and enter the reverse proxy rules for this site. there is a hidden setting to enable reverse proxy, so be sure to answer ok to the popup when you create the first reverse proxy rule via the gui. after you down this once on the webserver, you can just edit the web.config  directly for any reverese proxy site.

    Wednesday, December 18, 2019 9:42 PM
  • User711641945 posted

    Hii liutzuyi,

    As bruce said, you need to install the AAR package and follow the steps:

    1.Be sure that you have hosted ASP.NET Core on Windows with IIS.

    2.Click on the Default Web Site from the tree view on the left->Select the `URL Rewrite` Icon from the middle pane, and then double click it to load the URL Rewrite interface.

    3.Chose the 'Add Rule' action from the right pane of the management console, and the select the 'Reverse Proxy Rule' from the 'Inbound and Outbound Rules' category.

    4.You can fill in the routing information.

    Reference:

    https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/

    Best Regards,

    Rena

    Thursday, December 19, 2019 9:34 AM
  • User-235226130 posted

    thanks for all your reply, make me learn much. But I still not can write correct rule, How can I write the rule let me finish the goal ?

    http://192.168.0.1:80 ---->   http://192.168.0.1:5000 

    thanks

    Thursday, December 26, 2019 12:03 AM
  • User711641945 posted

    Hi liutzuyi,

    You just need to type `192.168.0.1:5000 ` in the last step.What the error did you make?

    Best regards,

    Rena

    Friday, December 27, 2019 7:41 AM