# Multiple Sites with seperate users

**URL:** <https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312>\
**Category:** Radiant CMS\
**Created:** [February 14, 2009, 8:04am UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312 "2009-02-14T08:04:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 14, 2009, 8:04am UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/1 "2009-02-14T08:04:11Z")

</div>

I’ve decided to develop my next CMS type site in Radiant, and hopefully  
make my CMS of choice, mainly because its simple, flexible and in Ruby.

What I would really like to do is setup a large machine running Radiant  
for simple brochure type sites for many clients. Each client would get  
their own radiant login for their site, and each site would have its own  
domain, layouts, snippets etc without one client affecting the other.

In one case so far, I would like to run multiple sites for a single  
user, sharing content.

I was hoping to run this with (1st choice) JRuby or (2nd choice)  
Passenger for efficiency and maintainability.

I should then have minimal maintenance, setup and hosting costs per site  
and be able to make some cash ;^).

I’m most concerned about Radiant’s ability to keep these clients  
seperate  
a) assuming they are non-technical, I don’t want them confused by seeing  
each others content  
b) where some malicious hacker gets a login to Radiant.

Any thoughts ? Is this possible now ? Anyone else wanting to achieve  
this ?

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 14, 2009, 9:49am UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/2 "2009-02-14T09:49:09Z")

</div>

There is an extension for the first part, running sites separately:

[http://ext.radiantcms.org/extensions/3-multi-site](http://ext.radiantcms.org/extensions/3-multi-site)

Not sure on its compatibility with radiant 0.7 nor running two separate  
sites while sharing content.

Jeff

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 14, 2009, 10:53am UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/3 "2009-02-14T10:53:44Z")

</div>

Jeffrey J. wrote:

> There is an extension for the first part, running sites separately:
> 
> [http://ext.radiantcms.org/extensions/3-multi-site](http://ext.radiantcms.org/extensions/3-multi-site)
> 
> Not sure on its compatibility with radiant 0.7 nor running two separate  
> sites while sharing content.

Thanks for that. Does anyone know how seperate the sites are from each  
other ?

Or is it mainly useful for a single user running multiple sites ?

Also, if I run each client as a seperate install of Radiant, would any  
Ruby interpreter manage memory eficiently by only keeping one copy of  
Rails and Radiant in memory ?

And how hard would it be for Radiant to support multiple independant  
sites from a single install ?

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 14, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/4 "2009-02-14T23:13:49Z")

</div>

On 14-Feb-09, at 5:30 PM, Bartee L. wrote:

> > Thanks for that. Does anyone know how seperate the sites are from  
> > And how hard would it be for Radiant to support multiple independant  
> > sites from a single install ?
> 
> I am trying to do the same thing. I installed multi\_site. It does  
> provide for multiple sites, but from what I can determine does not  
> provide user scope. That is each user is assigned to a site and the  
> user can ONLY see their pages/snippets/layouts. So without that it  
> really does not do me any good to have all of my clients using one  
> radiant code base.

I’m in a similar situation and have found some code that gives the  
appearance of user scope for many of the more common extensions. The  
standard approach seems to be to hide the content from other users  
rather than deny them access which is not ideal but works well enough  
for my users.

I’d love to see a little more support for multi-site deployments. Ruby  
deployments are still quite resource intensive and running multiple  
sites on a single codebase is the best way to minimize resource usage  
right now.

Here are the two I have bookmarked though I also found similar  
projects for other extensions at github.  
[http://github.com/netzpirat/radiant-search-multi-site-extension/tree/master](http://github.com/netzpirat/radiant-search-multi-site-extension/tree/master)  
[http://github.com/netzpirat/radiant-paperclipped-multisite-extension/tree/master](http://github.com/netzpirat/radiant-paperclipped-multisite-extension/tree/master)

Troy

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 14, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/5 "2009-02-14T22:30:03Z")

</div>

Mr Magpie wrote:

> Jeffrey J. wrote:
> 
> > There is an extension for the first part, running sites separately:
> > 
> > [http://ext.radiantcms.org/extensions/3-multi-site](http://ext.radiantcms.org/extensions/3-multi-site)
> > 
> > Not sure on its compatibility with radiant 0.7 nor running two separate  
> > sites while sharing content.
> 
> Thanks for that. Does anyone know how seperate the sites are from each  
> other ?
> 
> Or is it mainly useful for a single user running multiple sites ?
> 
> Also, if I run each client as a seperate install of Radiant, would any  
> Ruby interpreter manage memory eficiently by only keeping one copy of  
> Rails and Radiant in memory ?
> 
> And how hard would it be for Radiant to support multiple independant  
> sites from a single install ?

I am trying to do the same thing. I installed multi\_site. It does  
provide for multiple sites, but from what I can determine does not  
provide user scope. That is each user is assigned to a site and the  
user can ONLY see their pages/snippets/layouts. So without that it  
really does not do me any good to have all of my clients using one  
radiant code base.

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 15, 2009, 12:49pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/6 "2009-02-15T12:49:10Z")

</div>

Thanks for all the responses. Those existing extensions at least give me  
something to work with for when I get onto this. Real multisite support  
might distinguish Radiant from the many other CMS out there, but I don’t  
know the others enough to say really.

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 15, 2009, 10:17am UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/7 "2009-02-15T10:17:50Z")

</div>

Nick Plate has done user scoping for the multi\_site extension:

> <https://github.com/zapnap/radiant-multi-site-extension/commit/46a035d00126be51a49f431e4838f3968d156486>
>
> \* scopes user level access to individual sites (admins and developers still have… access to all sites)
> \* regular users cannot see, edit, or access other user sites that they do not own
> \* optionally scopes layouts to sites
> \* snippets usable everywhere, but display and editing of snippets limited to admins/developers
> 
> updated for radiant 0.6.7

but unfortunately he did it just before josh french converted the  
official tests to specs. So you have either the official multi\_site  
with specs and no user scoping, or the user scoped multi\_site with no  
specs. I planned to convert Nicks enhanced version with tests to  
specs, but I didn’t found any free time until now.

Michael

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 16, 2009, 12:01pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/8 "2009-02-16T12:01:54Z")

</div>

> Could you keep us posted on this forum.
> 
> I really would like to have this. I have installed 0.7.0
> 
> I am going to hold off using this until I can get multi-sites and users.
> 
> thanks

Hey, I wouldn’t want anyone to be holding their breath for me to do  
this.  
I haven’t even looked at the Radiant code base, and I’m quite pushed to  
do anything non-essential at present. I could get by with one Radiant  
install per customer for some time. I’ve got hungry mouths to feed.  
Sorry if I gave the wrong impression.

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 16, 2009, 2:25pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/9 "2009-02-16T14:25:52Z")

</div>

Mr Magpie wrote:

> > Could you keep us posted on this forum.
> > 
> > I really would like to have this. I have installed 0.7.0
> > 
> > I am going to hold off using this until I can get multi-sites and users.
> > 
> > thanks
> 
> Hey, I wouldn’t want anyone to be holding their breath for me to do  
> this.  
> I haven’t even looked at the Radiant code base, and I’m quite pushed to  
> do anything non-essential at present. I could get by with one Radiant  
> install per customer for some time. I’ve got hungry mouths to feed.  
> Sorry if I gave the wrong impression.

Magpie,

No wrong impressions… just hope.

I absolutely understand the “shoes for Baby” problem.

So I too will be using individual installs.

Thanks for you input and good luck on feeding the kiddies…

…bartee…

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 15, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/10 "2009-02-15T17:54:32Z")

</div>

Michael Kessler wrote:

> Nick Plate has done user scoping for the multi\_site extension:  
> [add scoped multi-site updates as described at http://blog.zerosum.org… · zapnap/radiant-multi-site-extension@46a035d · GitHub](http://github.com/zapnap/radiant-multi-site-extension/commit/46a035d00126be51a49f431e4838f3968d156486)  
> but unfortunately he did it just before josh french converted the  
> official tests to specs. So you have either the official multi\_site  
> with specs and no user scoping, or the user scoped multi\_site with no  
> specs. I planned to convert Nicks enhanced version with tests to  
> specs, but I didn’t found any free time until now.
> 
> Michael

Could you keep us posted on this forum.

I really would like to have this. I have installed 0.7.0

I am going to hold off using this until I can get multi-sites and users.

thanks

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 18, 2009, 12:41pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/11 "2009-02-18T12:41:53Z")

</div>

Hey guys. I wrote a vhost extension back in October that does what  
you’re looking for… separate sites, separate admin interfaces, one  
install. I was holding it back because it runs something proprietary  
but finally my conscience wouldn’t let me hold it back any more.

> **[GitHub - jgarber/radiant-vhost-extension: Like the multi\_site extension but...](https://github.com/jgarber/radiant-vhost-extension)**
>
> Like the multi\_site extension but each domain appears to operate independently with its own scoped pages, snippets, and layouts. Host multiple, independent web sites. Right now only works with Ra...

It was last updated in October of 2008, so it won’t work with 0.7.0.  
I won’t have time to update it soon, but please, fork away!

- Usernames and passwords are shared between sites (a good thing),  
but you choose which users have access to which sites.
- You log in to [example.com](http://example.com)’s admin interface by going to [example.com/](http://example.com/)  
admin and logging in. [example2.com](http://example2.com)’s admin is at [Log In ‹ Example — WordPress](http://example2.com/admin)  
There is no interface to move between sites, and that’s a good thing!
- Pages, layouts, and snippets are separate, not shared.
- You can have one catch-all (\*) site.

TODO:

- do more of a regular expression match (like multi\_site?) so that  
the hostname doesn’t have to match exactly.
- a better way than scoping? many other extensions are not compatible

Jason

---

<div class="post-metadata">

**Author:** ![magpie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magpie](https://www.ruby-forum.com/u/magpie)\
**Post date:** [February 18, 2009, 1:24pm UTC](https://www.ruby-forum.com/t/multiple-sites-with-seperate-users/160312/12 "2009-02-18T13:24:10Z")

</div>

Jason G. wrote:

> Hey guys. I wrote a vhost extension back in October that does what  
> you’re looking for… separate sites, separate admin interfaces, one  
> install. I was holding it back because it runs something proprietary  
> but finally my conscience wouldn’t let me hold it back any more.
> 
> [GitHub - jgarber/radiant-vhost-extension: Like the multi\_site extension but each domain appears to operate independently with its own scoped pages, snippets, and layouts. Host multiple, independent web sites. Right now only works with Radiant 0.6.9](http://github.com/jgarber/radiant-vhost-extension)
> 
> It was last updated in October of 2008, so it won’t work with 0.7.0.  
> I won’t have time to update it soon, but please, fork away!
> 
> - Usernames and passwords are shared between sites (a good thing),  
> but you choose which users have access to which sites.
> - You log in to [example.com](http://example.com)’s admin interface by going to [example.com/](http://example.com/)  
> admin and logging in. [example2.com](http://example2.com)’s admin is at [Log In ‹ Example — WordPress](http://example2.com/admin)  
> There is no interface to move between sites, and that’s a good thing!
> - Pages, layouts, and snippets are separate, not shared.
> - You can have one catch-all (\*) site.

Sounds great !

Some questions :

- can you have seperate databases or table prefixes ?
- is it compatible with the sns and sns\_file\_system extensions ?  
Basically I would like to be able to backup and restore each site  
seperately.
- does the “catch all” site share its contents with all others ie is  
that the point of it ?
- I’m guessing this extension by its nature would be sensitive to future  
changes in the Radiant code, and so ideally should become part of  
Radiant. Do you agree ?

Cheers

magpie
