I have a Node.js web app that creates portfolios for users who sign up, and those portfolios can be viewed via their sub-domain:
[login to view URL]
[login to view URL]
[login to view URL]
And so on...I currently have a few hundred users using this and my Nginx sub-domain configuration works great. I now want to allow my users to use custom domains like so:
[login to view URL]
[login to view URL]
[login to view URL]
So if the users go into their domain DNS and change their CNAME to their sub-domain, it will then point to the sub-domain but match the urls, so it would do something like so:
[login to view URL] -> [login to view URL]
[login to view URL] -> [login to view URL]
[login to view URL] -> [login to view URL]
And if for example user1 had an 'about page', it would do the following:
[login to view URL] -> [login to view URL]
So it would match the URL.
I know this is a lot easier to do in Apache Virtual Hosts, but in Nginx it just seems a huge pain. I have an SSL certificate for my main website and the user sub-domains, so all sub-domains run via HTTPS.
I'm aware that most user's custom domains such as:
[login to view URL]
[login to view URL]
[login to view URL]
Will not run HTTPS, so I need someone to help me configure my server to allow for somebody to type in: [login to view URL] and it maps the content from [login to view URL] (all the Node.js code is already done).
I have to stress: you must understand Nginx and understand that I'm not manually going to create virtual hosts, you must make my Nginx configuration dynamic to handle 1,000+ users.
I have uploaded my current Nginx config. This shouldn't be that hard to fix, my max budget is $50, if you can do this ASAP I will tip you.
Also, I'd rather not give out server access as it's a production server, so I'd like you to take my config and I can change it live over chat.