Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Installing Many SilverStripes on one server


Reply


4 Posts   1524 Views

Avatar
Junglefish

Community Member, 104 Posts

15 October 2009 at 2:11am

Edited: 15/10/2009 2:15am

Looking through the documentation, I can only find reference to cases where SS is set up once on a server, usually in a directory that is directly below the root, eg. C:\wamp\www\silverstripe

Is it possible to install many instances of SS on the same server, in a structure that would look a bit like this:

www/
----site01/
--------silverstripe/
----site02/
--------silverstripe/
----etc...

I tried it but when I tried to access the first one I was getting 403 (Permission denied) errors everywhere.

Before I start messing around with Apache, can someone confirm that it is in fact valid to install many SSs like this?

jf/

Avatar
banal

Community Member, 901 Posts

15 October 2009 at 3:12am

Edited: 15/10/2009 3:13am

Do you mean totally separate copies of SilverStripe, eg. each install has its own cms, sapphire etc. folders? If yes, that's as simple as copying the files over to the webserver. Should work without any problem actually.. you have to alter the .htaccess file after the move though (change the RewriteBase to the appropriate path). And every installation needs it's own Database.

If you want to use the same SilverStripe code-base (sapphire, cms etc) for multiple sites, you should use symlinks (more info in this thread: http://silverstripe.org/general-questions/show/251650). I don't know a good windows pendant to symlinks though.

Avatar
Willr

Forum Moderator, 5513 Posts

15 October 2009 at 1:56pm

Yes works fine. I use subfolders for my local host and for my live server. On my live server I use VirtualHosts to point to correct location, on my local having sub folders works fine. You might need to configure the RewriteRule in the .htaccess file.

Avatar
Junglefish

Community Member, 104 Posts

16 October 2009 at 2:00am

Thanks guys!

Yep it all seems to work fine.

For anyone else looking for the same answer, I simply moved my entire installation down one directory level to, in my case, www/site01/silverstripe/ .

I then edited the \SilverStripe\.htaccess file, altering
RewriteBase /SilverStripe
to
RewriteBase /site01/SilverStripe

Next, to prevent users accessing the directory structure higher up the tree, I edited my apache httpd.conf file adjusting the 'Deny from all' and 'Allow from 127.0.0.1' for each parent directory as appropriate (your chosen settings will almost certainly be different to mine, just play around until you get works best for you).

Viola! It all came up fine.

I haven't set up a second installation yet in parallel, but I'm assuming it'll be fairly straight forward. If I come across any gotchas I'll post them here.