21309 Posts in 5738 Topics by 2603 members
| Go to End | Next > | |
| Author | Topic: | 13754 Views |
-
Re: multisites possible?

6 May 2010 at 7:11am
Is there any update to this if using 2.4 r2?
I am considering this for my clients and possibly the following setup.All admin done via one domain "myclientadmin.com"
I think I can program the ability to redirect a client to the "myclientadmin.com" if they try to come into admin via "myclient1.com/admin"
All images and files are hosted on Amazon s3 so that probably would mean not changing the image file.
But how do I handle different modules for different clients?Any suggestions where to start here?
john -
Re: multisites possible?

23 July 2010 at 10:43pm
created folder and copied files, created symlink as suggested from Juanitou. Now I stuck with the BASE_PATH. Where do I have to correct it? And what is it supposed to say?
Have an "application"-folder "silverstripe" in the root of my testserver with subfolder cms and sapphire. have a "website"-folder ss_one for the first site (will have folder ss_two etc. for other websites) and in this I have the symlinks to cms and sapphire and subfolder assets, mysite and themes.
when I try to open the site I get the error:
$project isn't set in /Applications/XAMPP/xamppfiles/htdocs/silverstripe/sapphire/core/ManifestBuilder.php on line 259
and I see the typical error site, with "Cannot modify header information...".
Does this error come from the information BASE_path or is there another problem? Thanks for any help
bye - nina
-
Re: multisites possible?

24 July 2010 at 2:04am
It's a little different in 2.4. The BASE_PATH constant is not calculated the same way. The fix is to create an index.php file in your site root:
<?php
define('BASE_PATH', dirname(__FILE__));
include ('sapphire/main.php');?>
And update your .htaccess file to point to that instead of sapphire/main.php.
-
Re: multisites possible?

24 July 2010 at 5:45am
There's a better way. Use _ss_environment.php to your advantage.
In your SilverStripe 2.4 base folder, create a file called _ss_environment.php and put the following line in it:
define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME'])), DIRECTORY_SEPARATOR));
Of course you are free to also add DB information that all your installations share, as described on the doc page above.
Then simply put the following line into mysite/config.php
require_once('conf/ConfigureFromEnv.php');
That's all. Works a charm here... here's how my file-structure of a typical site looks like:
BaseInstall2.4.1 (silverstripe codebase)
+- sapphire
+- cms
+- googlesitemaps
+- dataobject_manager
+- swfupload
+- _ss_environment.php (as described above)
SomeSite (all website folders are structured like this)
+- sapphire (symlinked to BaseInstall2.4.1/sapphire)
+- cms (symlinked to BaseInstall2.4.1/cms)
+- googlesitemaps (symlinked to BaseInstall2.4.1/googlesitemaps)
+- dataobject_manager (symlinked to BaseInstall2.4.1/dataobject_manager)
+- swfupload (symlinked to BaseInstall2.4.1/swfupload)
+- assets own asset folder for each site
+- mysite own mysite folder for each site
+- _config.php as described aboveSo all websites are structured like SomeSite and have only a custom assets and mysite folder, but otherwise share the same codebase.
-
Re: multisites possible?

24 July 2010 at 7:07am
what about uploading stuff? i remembered last time i made that, when the editor uploaded a file sapphire started with the problems..
-
Re: multisites possible?

24 July 2010 at 7:50am
@dospuntocero: Uploading should work fine. Never had problems with it (I always use a separate assets folder for each install and set it's permission bits to 0777).
| 13754 Views | ||
| Go to Top | Next > |




