Multi site with per site login and central user administration

rubytastic edited this page Aug 24, 2010 · 14 revisions

Context

The purpose of this page is to document the setup of radiant with multisite. With multi site you can host several websites from 1 radiant instance saving costly memory on your server. I found this very hard to setup and hope this documentation will be completed by others and a good start to setup multi-site with radiant. In addition to multi site this page also explains how you can get a per-site scoped admin, so you can create a user that can login to a certain site.I have commented all steps to set this up locally (in my case OSX)

Radiant edge installation

#Install a regular Radiant version 9.x edge latest version and edit database.yml

sudo gem install radiant
radiant --database [mysql|postresql|sqlite3|sqlserver|db2] path/to/project
cd /path/to/project
vi /config/database.yml
rake development db:bootstrap
rake radiant:freeze:edge && rake radiant:update && rake db:migrate

Setup hosts file & Git

#Edit your hosts file ( on OSX /etc/hosts) and add like below line to add domains

sudo vi /etc/hosts
127.0.0.1 domain1 domain2 domain3 admin

#Inside your /path/to/project initialize GIT

git init .

Multisite and scoped admin extensions

#Install spanners multi site extension

git submodule add git://github.com/spanner/radiant-multi-site-extension.git vendor/extensions/multi_site
rake radiant:extensions:multi_site:migrate
rake radiant:extensions:multi_site:update

#Install spanners scoped admin extension

git submodule add git://github.com/spanner/radiant-scoped-admin-extension.git vendor/extensions/scoped_admin
rake radiant:extensions:scoped_admin:migrate

Setup radiant and create domains

Now the basics are setup, we should create our domains inside radiant, first we start the radiant project inside /path/to/project

#Start radiant

/script/server -e production
#Go to the multisite page

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.