/yarp-dual-blazor

Yarp in front of two blazor sites on same machine hosted at different ports, with two dns names.

Primary LanguageCSSCreative Commons Zero v1.0 UniversalCC0-1.0

YARP : Reverse proxy setup for two sites hosted locally with different names

To get two different blazor sites hosted on the same machine on different ports to respond to different DNS names, I use YARP, Microsoft's Yet Another Reverse Proxy.

Ensure your hosts file has three entries:

127.0.0.1 dev.local 
127.0.0.1 red.local 
127.0.0.1 blue.local 

Then launch dotnet run on site1 and site2. When they are running, you can launch reverse-proxy-yarp. It is configured by the json file appsettings.json which gives the redirection Routes.

When they are all running, try to access: