1 Panel for multiple websites

Hi @lukasbestle, et. al. – pardon me for resurrecting an old thread, but it’s relevant to my situation…

Using clues from this and a few other threads, I’ve gotten a multisite running with only content separated. Accounts and sessions are shared, but each site has its own panel. (Setup shown below.)

I’m not sure how to get from here to “one panel,” and I think it’s down to my limited PHP skills.

  1. With my site/config/config.php shared, I can’t disable the panel of the individual sites. In addition to the individual content folders, should I be using individual config folders – content/siteone/config/config.php and content/sitetwo/config/config.php? I’m not sure how to set up different routing in index.php for the “outer” site vs. the individual sites. (And I wouldn’t actually care if those panels were disabled or not, as long as a master panel was accessible.)

  2. How would I achieve “Setup a [third] site in the multisite setup that receives the whole content directory as input. This site will then be used for the Panel.” I presume this would be my “base” site, but, likewise, I don’t know how to direct that root alone to receive all of /content in index.php.

I wonder if you could tell me if I’m on the wrong track with this setup, or if you could suggest a way forward…?

<?php
require 'kirby/bootstrap.php';

$sites = [
  'multisite.com' => __DIR__,
  'siteone.com' => 'siteone',
  'sitetwo.com' => 'sitetwo',
];

$host = Url::host();
$root = $sites[$host];
$url  = 'http://' . $host;

$kirby = new Kirby([
  'roots' => [
    'index'   => __DIR__,
    'site'    => __DIR__ . '/site',
    'content' => __DIR__ . '/content' . '/' . $root,
    'media'   => __DIR__ . '/media',
    'assets'  => __DIR__ . '/assets'
  ],
  'urls' => [
    'media'  => $url . '/media',
    'assets' => $url . '/assets',
  ],
]);

echo $kirby->render();