startup/config_check.php
Permalink
First of all, I'm new to C5 and I'm very impressed so far. Well done!
I have a suggestion regarding the bootstrapping that may (or may not) help those who want a single installation to host multiple sites. Quite simple: borrow an idea from Drupal to switch between site.php variants using the virtual host name.
I've attached two files: the first is the original v5.4.1 config_check.php startup file. Aside from containing four unnecessary lines (10, 11, 12, and 14), it would be helpful here to allow selection of the site.php file based on requested hostname.
So the second file is a modified version that performs a file-existence check for site.php variants.
Unlike Drupal's extensive scheme, what I propose is as simple as it gets. This is enough to allow someone hosting multiple sites to switch between them automatically.
There is no UI support for this (nor in Drupal either). If you want to use it, you need to copy site.php to the new name and edit it on your PC as required. It's not intended for naive users.
Being a newbie, I'm not sure how the addon and theme configuration will work out. Drupal allows addons and themes to be *disabled*, a useful feature that makes multi site hosting easier because the codebase can merely contain the union of all required packages but unused packages don't have an adverse impact on performance or complexity.
I have a suggestion regarding the bootstrapping that may (or may not) help those who want a single installation to host multiple sites. Quite simple: borrow an idea from Drupal to switch between site.php variants using the virtual host name.
I've attached two files: the first is the original v5.4.1 config_check.php startup file. Aside from containing four unnecessary lines (10, 11, 12, and 14), it would be helpful here to allow selection of the site.php file based on requested hostname.
So the second file is a modified version that performs a file-existence check for site.php variants.
Unlike Drupal's extensive scheme, what I propose is as simple as it gets. This is enough to allow someone hosting multiple sites to switch between them automatically.
There is no UI support for this (nor in Drupal either). If you want to use it, you need to copy site.php to the new name and edit it on your PC as required. It's not intended for naive users.
Being a newbie, I'm not sure how the addon and theme configuration will work out. Drupal allows addons and themes to be *disabled*, a useful feature that makes multi site hosting easier because the codebase can merely contain the union of all required packages but unused packages don't have an adverse impact on performance or complexity.
This seems like a decent solution though ideally each site should have its own file directory as well.
Is this as easy as defining
define('DIR_FILES_UPLOADED', DIR_BASE . '/abcdefiles');
in the site.php-that-is-called-something-else?
define('DIR_FILES_UPLOADED', DIR_BASE . '/abcdefiles');
in the site.php-that-is-called-something-else?