I am running a hosted platform for publishing Markdown documents. Currently I offer a subdomain per user, but the number one request right now is custom domains.
My server stack is NGINX and uWSGI to handle user activities and reporting tools. The published documents are served statically straight out of NGINX.
I haven't tackled the feature request yet, but I've been doing some research and currently it looks like I would could solve it by using the redis2 and lua modules. Those two modules together should handle querying incoming Host headers against a key-value table in redis to match domains and user folders.
I would love your thoughts and experiences, and especially potential problems that might crop up and what to look out for.
Bonus: Anyone have a good experience with a third party domain provider, either selling through an API and collecting a referral fee for each bought domain?