-
I would like to do something similar described here: Connect domain to yarp #2033. But Yarp cannot listen on the whole port 80 because IIS is also running on the server. How to configure Yarp so that is listens on http://server1/MyApp (or just http://127.0.0.1/MyApp) and forwards requests to http://127.0.0.1:5000? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
What binding is IIS using? If it's http://IpAddress:80 then you just need to set a different IP. If its http://hostname:80, or http://*:80, then you can only share the port by using YARP with the AspNetCore IIS or HttpSys servers, not Kestrel. |
Beta Was this translation helpful? Give feedback.
-
Binding of IIS is http:*:80 - it is the default binding. At the moment my Blazor Web Server App is using HttpSys server. But HttpSys server is much slower than Kestrel. Testing showed that Blazor Server Web App with HttpSys is much slower than Blazor Server Web App with Kestrel and IIS in-process hosting. IIS must be installed because it is being used by other "legacy" software. And I do not want to use IIS to run my Blazor Server Web App. So the idea is to create my own proxy server with Yarp and use it to forward request from http://*/MyApp to http://127.0.0.1:5000. Is it possible? Does Yarp support port 80 sharing? |
Beta Was this translation helpful? Give feedback.
YARP handles forwarding requests, not accepting requests. It builds on top of an AspNetCore server like Kestrel, IIS, or HttpSys. Port sharing is handled at the server level. Kestrel cannot share ports with IIS or HttpSys when using * or host names.