From 98346d6f10bd29879b1db6b11c2701740da7c763 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 6 Nov 2016 13:57:05 +0100 Subject: [PATCH] #10 - Make TLD suffix more configurable --- .devilbox/www/config.php | 11 +++++++++++ .devilbox/www/include/lib/Docker.php | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 1a20e186..e24faca4 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -16,6 +16,17 @@ $VEN_DIR = $INCL_DIR . DIRECTORY_SEPARATOR . 'include'; $LOG_DIR = dirname(dirname($CONF_DIR)) . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR . 'devilbox'; + +/** + * TLD suffix for mass virtual hosts. + * + * This is currently hardcoded and must be changed here + * as well as in the webserver config. + * @var string + */ +$TLD_SUFFIX = 'loc'; + + // // Set Docker addresses // diff --git a/.devilbox/www/include/lib/Docker.php b/.devilbox/www/include/lib/Docker.php index 26a68cc5..cf2e989d 100644 --- a/.devilbox/www/include/lib/Docker.php +++ b/.devilbox/www/include/lib/Docker.php @@ -84,6 +84,10 @@ class Docker $this->_env[$tmp[0]] = $tmp[1]; } + // Set the TLD suffix (domain ending) for virtual hosts + // Note: If this is changed it currently also needs to be changed + // in each webserver's configuration file in .devilbox//02-vhost-mass.conf + $this->_tld = $GLOBALS['TLD_SUFFIX']; }