问题
I am working on a MEAN stack SAAS application where I provide each user with their own unique subdomain. For example, the user John Doe has the following subdomain to his name: johndoe.website.com.
Now, if John, the user, wants to map his subdomain to his own custom domain or subdomain, for instance, register.johndoe.com/registraton, he should be able to do that.
How can I accomplish this?
I am looking for steps to accomplish this using NGINX and Node js in a manner that will lead to minimal changes to our existing code base.
I have searched the internet, and I was unable to find a resource that can serve as a step-by-step guide to help me solve this problem.
I know that the solution would involve the creation of Server Blocks to handle wildcard subdomains using NGINX, but I am not sure about the exact steps that will have to be implemented to get this done.
来源:https://stackoverflow.com/questions/61230367/how-do-i-provide-to-my-customers-the-ability-to-map-their-custom-domains-with-my