How to dynamically map xxx.mydomain.com where xxx is a user generated name?
June 17, 2021 10:30AM
Sorry for the vague title. Let me elaborate. I do not know the keywords for this so I couldn't Google this.

Imagine mydomain.com is a platform where people could come in and generate their contents. They could create their own pages and each of their page is to be mapped to xxx.mydomain.com.

so suppose there is a user named "John Doe" and his ID is 222, you can access his page via john-doe.mydomain.com . Currently, my web app already has something like mydomain.com/userpage/john-doe-222.

Is it possible to dynamically map the former URL to the latter URL in NGINX without restarting? I would like to make it so the users could even change their own xxx.mydomain.com freely as well. Is such functionality possible in NGINX? How to proceed in this case? Thank you.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready