I have created a website with a tiny administration panel that lets the owners change attributes about the site (primary color, background image, some content etc). Their changes are stored in a database.
What I want is to have multiple domains pointing to this site, and for the site to render the correct attributes (styles and content) based on the requests host header.
My thought was to create a reverse proxy front end server using NGINX with multiple server blocks pointing to the same application server (hosted on heroku). The application server again makes requests to the database server.
Then I would add a middleware to my application that checks the request host header, and looks up content in the database based on where the request is coming from.
My questions are:
Is this a "normal" way to solve my problem? I am in the process of learning server setup and administration, so I don't know if this is a good / stable / scalable setup. Or if it will work at all. If not, how should I go about solving this?
What is the limit of server blocks one NGINX instance can handle?