Here's my question: How do I get two simultaneous instances of Kestrel (behind Apache on the same domain) to bind to their respective SSL ports using the certificate produced by Certbot (Let's Encrypt). Do I really need to bind all the endpoints in an app as suggested by several articles that I have found?
Here's the background:
I have a domain with three dotnet apps behind an Apache server on Ubuntu 18. I have the apps working in my development environment which is Visual Studio 19 on Windows 10.
The apps are: MVC main site app which is a essentially a blog, a Blazor game and an API that controls the game. The API is also used by the main site to co-ordinate games between players.
Both the MVC and the Blazor app use Identity Framework and access the same users database. Apache redirects requests to the root to the MVC app and anything preceded by /blazor to the blazor app. So if a user logs into the main app the browser cookie should allow that user to continue to the game without having to login again.
I have learned that Blazor requires SSL for its authentication and in my DEV environment the apps are bound to ssl ports simply using the UseUrls call. They all work fine, however...
The problem is with deployment.
Executing the Blazor app on the server results in: Unable to configure HTTPS endpoint. Needless to say, altering the UseUrls call not to use SSL means that authentication fails.
Now, my server uses Certbot and can provide a secure connection to Apache and the MVC frontend works ok (the app itself is not https).
I've been researching SSL and found many articles on setting up SSL with dotnet. None seem to talk about the reverse proxy situation. None of them seem to talk about multiple apps within a domain. And in the case of Let's Encript suggest the apps should get and renew the cert themselves. This last option seems it would be a problem for challenges if one of the apps is only available from a specific endpoint. And wouldn't different certs mean that the login detail would get lost between the apps?
I want to specify the Certbot cert and get Kestrel to bind to the port specified on both front end apps.
Can anyone suggest the best way forward or point me to an article that might help?