How to configure SS to listen (bind) to a specific IP/URL instead of glooming

Hi,

I am trying to setup multiple SS services on port 443, each with its own URL.

https://api1.mycompany.com
https://api2.mycompany.com
etc

The first service works fine, but after that I get:
Exception Info: System.IO.IOException: Failed to bind to address https://[::]:443: address already in use. Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted.

How can I configure SS to listen (bind) to a specific IP or URL instead of glooming? (i.e. is there a SS setting like MYSQL’s bind-address)

I’d really rather avoid having to ask clients to use a specific port for each API.

Thanks!

Francis

How an ASP .NET Core App binds to its endpoints isn’t configured in ServiceStack, see ASP .NET Core docs on how to configure different endpoints on web servers, e.g:

Generally binding multiple processes to the same port isn’t supported, the way this is normally achieved is to use a reverse proxy.

E.g. here’s how to configure an ASP .NET Core Virtual host with an nginx proxy:
https://docs.servicestack.net/netcore-deploy-rsync#setup-nginx

Whilst our GitHub Actions Templates shows how to reverse proxy multiple ASP .NET Core Docker Apps

That’s also pre-configured in our jamstacks.net templates

1 Like