Posted on: 03/14/06 04:11pm
By: phpsocialclub
I have been thinking about setting this up for a while and have started today with a fair amount of success.
basically I have set up a couple of test domains to point to one directory.
I use a switch to choose the right config.
require_once( '/path/to/defaultconfig.php' );
switch ($_SERVER["HTTP_HOST"])
{
case "domain1.com":
require_once( '/path/to/config1.php' );
break;
case "domain2.com":
require_once( '/path/to/config2.php' );
break;
}
next I removed all the config options from the second config files that do not need to be repeated, paths, admin stuff and what not. You can always add them back into the second file if you need to.
I have also made some changes to the second config files for db info, paths to logs, images, and rss feed so that each site can have a completely unique installation.
The only thing that is a bit of a pain is that the install.php file has the config.php file name hard coded into it.
Overall I have not changed very much GL core code, so updates should be easier. Once I am done with this, I should be able to keep all of my customers sites updated in a much easier fashion because they will all have one code base.
Is there anyone else out there working on a similar type install?
Andrew
Multiple Sites / One GL installation
Posted on: 03/14/06 05:17pm
By: Dirk
Multiple Sites / One GL installation
Posted on: 03/14/06 05:50pm
By: phpsocialclub
Dirk,
thanks for the link, I really did not think I was doing anything very novel.
One question I have for you and the development team.
Do you see any problems with changing the default install.php to allow for a different name of the config file.
It would not be a major change, but it would make updating and installing multiple sites much easier, if you could type the name of the config file into the input and have it do all instead of opening the file and changing the code for each site.
thanks for the quick response,
Andrew
Multiple Sites / One GL installation
Posted on: 03/15/06 03:10pm
By: Dirk
[QUOTE BY= phpsocialclub] Do you see any problems with changing the default install.php to allow for a different name of the config file.[/QUOTE]
Actually - yes. The install script should assist novice users and accepting names other than "config.php" would only cause confusion.
For the more advanced users, it shouldn't be too hard to modify the install script to suit their needs.
bye, Dirk