How to create / handle subdomains on the fly using NGINX and Node Js?

隐身守侯 提交于 2021-01-28 04:07:47

问题


I am working on a MEAN stack SAAS application where I want to provide each user with their own unique subdomain. For example, I want the user John Doe to have the following subdomain to his name: johndoe.website.com.

The application is nearly ready pending this feature. 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/61226187/how-to-create-handle-subdomains-on-the-fly-using-nginx-and-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!