I'm familiar with building small simple scripts for an individual site but now I need to build a more complex web app that works across hundreds of thousands of separate domains & web servers.
I don't believe it is a good idea to install a separate databases and php application files for each domain (hundreds of thousands) because we I will be needing to make improvements to the application as time goes along and it would be a nightmare to manage and keep consistent across that many different domains & web servers.
So, I'd like to keep the database and php application files all on one central web server and I'm wondering how to pull this off?
The way I envision a solution is to upload a index.php and admin.php file to each domain's web server that has the client's unique account info in it. Then when someone browses to the tld, the index.php file would go out over the internet to the central application server to get the whole website/data for that account and display it back to the domain that the internet surfer browsed to (not needing to know about the central server at all). Also each client will need to manage/change their domain's website by going to admin.php, logging in, and making the changes to the central database. However, I want it to work like the index.php file where it downloads the admin UI and interacts with the php application files on the central web server to manage the account. So that is 1 central set of application files, 1 central database, 100,000+ client domains, only 2 files on each client domain (index.php & admin.php).
Would this be a good solution in your opinion?
If so, how do you go about getting the whole application to load through another domain using just 1 php file (index.php or admin.php)?
I could really use some help with this one since it is critical to an important business in the next few months.
Thank you very much for any help! 🙂