17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2430 Views |
-
multi-host support

31 July 2007 at 10:05am
I noticed that _config.php sets a project variable.
In support of consolidated code does silverstripe
support multiple projects at the same time.If so how would you configure it? If possible
I'd like to use a virtual host server to host
multiple domain-names. Normally I would
put a copy of silverstripe in each doc_home
but from the way _config.php sets the project
I'm wondering if there is a way to bypass the
multiple copies of silverstripe. -
Re: multi-host support

31 July 2007 at 10:53am
There is current no way to do this currently (to my knowledge).
-
Re: multi-host support

31 July 2007 at 5:16pm
The project variable lets you change the name of the 'mysite' folder to something else. In our internal development environment, we have each sites project-specific folder named differently.
If you're wanting to do code-consolidation, the best bet is to experiment with symbolic links.
* Move the sapphire, cms and jsparty folders to some common place.
* Add symlinks for them in each of your projects. -
Re: multi-host support

26 October 2008 at 10:54am
Hi,
For developing i'm also working with symbolic links. But i got a problem with the "assets" Folder. In the Media Manager it tries to get to the folder relativ (../assets), and start looking in the common source folder for the image. finally it ends up in a fatal error, that it couldn't find the file. Is it importent that it looks for the file relativ, or could it be changed in an absolute path? Or is there a better way to fix that?
thanks,
webair
-
Re: multi-host support

4 November 2008 at 9:56pm
Does anybody has a patch for this problem? I'm willing to run 100+ SilverStripe sites on a server and need symbolic links for space and performance (caching!) efficiency.
-
Re: multi-host support

16 November 2008 at 2:40am Last edited: 16 November 2008 2:41am
Hi
I added that issue as an bug. You can find it under http://open.silverstripe.com/ticket/3074.
best regards
webair
-
Re: multi-host support

18 November 2008 at 7:49pm
I achieved this with sub-domains. Change your _config.php to do the following:
if (isset($_SERVER['SERVER_NAME'])) {
$servername = $_SERVER['SERVER_NAME'];
$domainpart = explode(".", $servername, 2);
$database = $domainpart[0];
} else {
die('..or you can configure to redirect to a default location.');
}and then change the database accordingly:
global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "localhost",
"username" => "username",
"password" => "password",
"database" => $database,
);But the fact remains that you can't use multiple paths for the assets folder depending on the sub-domain, or at least I could not figure that out. If there is a function like Filesystem::setAssetsPath() please let me know.
Cheers.
| 2430 Views | ||
|
Page:
1
|
Go to Top |





