Multisite configuration¶
You can configure the available SiteAccesses under the ibexa.siteaccess
configuration key.
SiteAccess configuration¶
1 2 3 4 5 6 7 8 9 |
|
SiteAccess groups¶
ibexa.siteaccess.groups
defines which groups SiteAccesses belong to.
1 2 3 4 5 |
|
You can use groups when you want to use common settings for several SiteAccesses and avoid duplicating configuration. SiteAccess groups act like regular SiteAccesses as far as configuration is concerned. A SiteAccess can be part of several groups. SiteAccess configuration has always precedence over group configuration.
admin
SiteAccess¶
The predefined admin
SiteAccess in admin_group
(configured in config/packages/ibexa_admin_ui.yaml
) serves the back office.
Don't remove this group.
If you need a multisite setup with multiple back offices, add any additional administration SiteAccesses to admin_group
.
In cases where the sites are on separate databases, each needs its own repository (including their own storage and search connection), var dir, cache pool, and ideally also separate Varnish/Fastly configuration.
Caution
Different SiteAccesses can only have different var_dir
if they also have different repositories.
Make sure there are no special or Unicode characters in your var_dir
values.
Default SiteAccess¶
The default_siteaccess
setting identifies which SiteAccess is used by default when no other SiteAccess matches.
1 2 3 |
|
SiteAccess matching¶
The match
setting defines the rule or set of rules by which SiteAccesses are matched.
For more information, see SiteAccess matching.
1 2 3 4 |
|
SiteAccess name¶
To create a better editorial experience, you can replace the SiteAccess code in the back office with a human-readable name of the website, for example Company site
or Summer Sale
.
You can also translate SiteAccess names. Displayed names depend on the current back office language.
To define translations or SiteAccess names, place them in YAML file with correct language code, for example translations/ibexa_siteaccess.en.yaml
:
1 2 |
|
Scope¶
All SiteAccess-aware configuration is resolved depending on scope.
The available scopes are:
global
- SiteAccess
- SiteAccess group
default
global
overrides all other scopes.
If global
isn't defined, the configuration then tries to match a SiteAccess, and then a SiteAccess group.
Finally, if no other scope is matched, default
is applied.
In short: if you want a match that always applies, regardless of SiteAccesses, use global
.
To define a fallback, use default
.
1 2 3 4 5 6 7 8 9 10 |
|
global
and default
scopes include the admin
SiteAccess, which is responsible for the back office.
For example, the following configuration defines both the front template for articles and the template used in the back office, unless you configure other templates for a specific SiteAccess or SiteAccess group:
1 2 3 4 5 6 7 8 9 |
|
SiteAccesses and Page Builder ¶
To define which SiteAccesses are available in the submenu in Page Builder, use the following configuration:
1 2 3 4 5 6 7 8 |
|
If you're using multiple domains, list all domains for an admin SiteAccess under siteaccess_hosts
:
1 2 3 4 5 6 7 8 |
|
SiteAccess with separate admin domain
If an admin SiteAccess in your installation uses a different domain than the front SiteAccesses, be sure to use SSL (https protocol). Otherwise, you cannot preview content in Page Builder from the back office.
SiteAccess switching in Page Builder¶
If you need to change between SiteAccesses in Site mode, don't use any functions in the page itself (for example, a language switcher). This may cause unexpected errors. Instead, switch between SiteAccesses with the SiteAccess bar above the page.
Location tree¶
You can restrict SiteAccesses to different parts of the content tree. When you do it, only the selected location and its descendants are reachable from this SiteAccess.
Configure this under the ibexa.systems.<scope>.content.tree_root
configuration key, for example:
1 2 3 4 5 6 7 8 |
|
location_id
defines the location ID of the content root for the SiteAccess.excluded_uri_prefixes
defines which URIs ignore the root limit set by usinglocation_id
. In the example above, to access the Media and Images folders, you can use their own URI, even though they're outside the location provided incontent.tree_root.location_id
.index_page
is the page shown when you access the root index/
.
Note
Prefixes aren't case sensitive.
Leading slashes (/
) are automatically trimmed internally, so they can be ignored.
Tip
For an example of a multisite configuration, see Set up campaign SiteAccess.