Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Multi Site

Tim Morgan edited this page Jan 26, 2015 · 1 revision

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.

Enable/Disable

To enable or disable multisite operation:

cd /path/to/instance
rake onebody:sites:on
# or
rake onebody:sites:off

Commands

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"

About Hosts

The host (specified as HOST on the command line) property of a site affects two operations within OneBody]]:

  1. 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.

  2. 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.

No WWW Please

Do not put a www. on the front of the host when creating/editing your sites.