-
Notifications
You must be signed in to change notification settings - Fork 283
Multi Site
OneBody has the ability to host multiple sites with only one installed instance.
To list, add, edit, and remove sites, you must work from the command line, using the rake
tool.
To enable or disable multisite operation:
cd /path/to/instance
rake onebody:sites:on
# or
rake onebody:sites:off
To see a list of commands, run this:
rake -D onebody:sites
Some commands require additional arguments, i.e. the add
command requires NAME
and HOST
arguments:
rake onebody:sites:add NAME="My Other Site" HOST="somedomain.com"
The host
(specified as HOST
on the command line) property of a site affects two operations within OneBody]]:
-
Web Server Site Selection
When someone visits somedomain.com (and you have requests forwarded through your web server to OneBody), the host is looked up in the list of Sites. If it matches, that is the site that is served to the visitor.
-
Incoming and Outgoing Email
All outgoing email uses the host of the current site to build the dynamic email addresses. For instance, an email from Tim Morgan in the "Imaginary Church" site (with
host = "imaginaryfamily.com"
) has a from address of[email protected]
. Also, incoming email is matched with the appropriate site based on the host.
Do not put a www.
on the front of the host when creating/editing your sites.