|Is this Scenario Possible|
Multiple Websites, Common Core
Basically i am looking to create a whole bunch of websites which would have 90% the same features and functionality, with limited variations from each other.But each website with use different content and data.
Now Instead of creating separate instances of the mostly common code in different web servers to create these different websites, is it possible using LAMP to have a central server which would host all the code (presentation and business logic) and depending on the site accessing the server, would present different layouts and functionalities to each one of them.
Simply put, each website would have something like a profile in the central server which would define how the website should look, what functionalities are enabled, what functionalities are disabled and depending on the website (domain) from which the request comes, the server would present the pages based on the pre-set profile.
Each website would be a different domain and not a sub domain of the main server.
i hope i make sense? is this kind of set up possible? If yes, are there any live examples that can be seen?
Thanks a tonne.
Yes, this setup easily achieved. Put simply, you can use Virtual Host to manage the domain side of it, and a set of PHP scripts to interface with your database and handle output.
|If yes, are there any live examples that can be seen? |
More than you can imagine. Many, many sites are run on the same server as other sites using common resources. (Either databases, scripts, images, or a combination thereof) You can even have each site get a unique IP address to point to the same server making it even harder to tell that they are all served by the same machine.
If I understand you correctly, you would like to reduce the hassle related by maintainig technically similar sites, and instead want to keep one core system and let the domains access those.
I was engaged in a similar situation a while ago, when many of the sites have had similar codes with their little differences uploaded to the unique domains. We dedicated a domain where all the other sites include 95% files from their domain as their own. something simlar to open_basedir.
|If I understand you correctly, you would like to reduce the hassle related by maintaining technically similar sites, and instead want to keep one core system and let the domains access those. |
Yes, for example product_information.php would be common common for all the sites. it will be one single physical file.
When site1.com/product_information.php is accessed, the system would load the layout set for site1 with the information (loaded from the db) of site1
Similarly site2.com/product_information.php will load site2's layout and site2's data.
You need to use open_basedir to limit the files you can access among you domains. [php.net...]