I have some questions regarding Nginx configuration with wildcard subdomains, and then how custom domains come into the picture. Here is my situation.
Let's say I own the site
awesome.com. When a user signs up for my site, they automatically get a subdomain. So user Steve could navigate to his homepage via
steve.awesome.com. To accomplish this, create a wildcard subdomain CNAME record. Internally, I want the application to treat this as
awesome.com/users/steve. After viewing this post, I believe I should be able to rewrite the route to my desired result, without actually changing what the URL displays in the browser.
Now, I want to allow Steve to set up his own custom domain. Let's say Steve owns the domain
iamsteve.com. Steve could then point his domain, to his subdomain
My main question is, when a request is made to
iamsteve.com, will my Nginx server receive the request as
steve.awesome.com, thus allowing the rewrite logic to still work correctly? Or will it actually receive the request as