Our SAAS application is composed of multiple servers running on different virtual machines each having its own IP address. We have purchased subdomains to point to each server. In short, we have following servers:CDN Server (pointed to by cdn.myapp.com)Webhook Server (pointed to by webhook.myapp.com)App1 Server (pointed to by app1.myapp.com)App2 Server (pointed to by app2.myapp.com)Accounts Server (common authentication server for App1 and App2, just like Google, pointed to by accounts.myapp.com)API Server (exposed API for consumers, pointed to by api.myapp.com)They are all hosted on their on own Digital Ocean Virtual Machines and we have purchased all the above subdomains separately.We gradually developed these components. Now, we are looking forward to reduce cost of SSL and subdomains by using wildcard subdomains and thus wildcard ssl.I have looked a lot into how we do nodejs with wildcard subdomains and all the examples and libraries I found were assuming we have one application running on one server and we are doing router redirection work based on subdomains i.e. if any application wants to create subdomains for all of the users (user1.myapp.com, user2.myapp.com etc)I was not able to understand how we can setup wildcard subdomain in my case where I have multiple applications running behind separate IP addresses. Should I setup a separate server for doing DNS routing?Please give suggestions. I have already looked into many places including these two:https://github.com/patmood/wildcard-subdomainshttp://expressjs.com/en/resources/middleware/vhost.html
Submitted July 15, 2020 at 10:23AM by sojharo
No comments:
Post a Comment