23001 Posts in 11854 Topics by 2828 members
|Go to End||Next >|
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?
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
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:
And update your .htaccess file to point to that instead of sapphire/main.php.
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
That's all. Works a charm here... here's how my file-structure of a typical site looks like:
BaseInstall2.4.1 (silverstripe codebase)
+- _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 above
So all websites are structured like SomeSite and have only a custom assets and mysite folder, but otherwise share the same codebase.
24 July 2010 at 6:44am
Banal's right.. that's the pro way to do it.
24 July 2010 at 6:51am
Great! Thanks a lot - I will try that!
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..
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).
|Go to Top||Next >|