I’m trying to set up a multi-site configuration as described in the Customized Folder Setup page.
I’m able to create site-specific panel accounts, but when I log in, I get this page:
Interestingly, hotlinking to a specific page works. e.g. http://starterkit.test/panel/#/pages/show/about/p:1
Steps to replicate:
- Download Starterkit 2.1.1 from http://getkirby.com/downloads
- Create
site.php
in root folder. (See contents below) - Move folders around to replicate the structure laid out in
site.php
/assets/avatars
becomes/assets/avatars/starterkit.test
/content
becomes/content/starterkit.test
- /
site/accounts
becomes/site/accounts/starterkit.test
/thumbs/
becomes/thumbs/starterkit.test
Contents of site.php
:
// /site.php
$kirby = kirby();
$domain = server::get('server_name');
$domains = array('starterkit.test');
if(in_array($domain, $domains)) {
// custom roots
$kirby->roots->accounts = __DIR__ . DS . 'site' . DS . 'accounts' . DS . $domain;
$kirby->roots->content = __DIR__ . DS . 'content' . DS . $domain;
$kirby->roots->avatars = __DIR__ . DS . 'assets' . DS . 'avatars' . DS . $domain;
$kirby->roots->thumbs = __DIR__ . DS . 'thumbs' . DS . $domain;
// custom urls
$kirby->urls->index = url::scheme() . '://' . $domain;
$kirby->urls->content = $kirby->urls->index . '/content/' . $domain;
$kirby->urls->avatars = $kirby->urls->index . '/assets/avatars/' . $domain;
$kirby->urls->thumbs = $kirby->urls->index . '/thumbs/' . $domain;
}