Merge pull request #244 from greybyte/vhost_config_variables
Variable substitution in vhost specialconfig
This commit is contained in:
committed by
Michael Kaufmann (d00p)
parent
8e8c97f7f9
commit
5136824844
@@ -18,7 +18,9 @@
|
||||
* @TODO ssl-redirect to non-standard port
|
||||
*/
|
||||
|
||||
class lighttpd {
|
||||
require_once(dirname(__FILE__).'/../classes/class.HttpConfigBase.php');
|
||||
|
||||
class lighttpd extends HttpConfigBase {
|
||||
private $logger = false;
|
||||
private $debugHandler = false;
|
||||
private $idnaConvert = false;
|
||||
@@ -145,7 +147,13 @@ class lighttpd {
|
||||
}
|
||||
|
||||
if ($row_ipsandports['specialsettings'] != '') {
|
||||
$this->lighttpd_data[$vhost_filename].= $row_ipsandports['specialsettings'] . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= $this->processSpecialConfigTemplate(
|
||||
$row_ipsandports['specialsettings'],
|
||||
$domain,
|
||||
$row_ipsandports['ip'],
|
||||
$row_ipsandports['port'],
|
||||
$row_ipsandports['ssl'] == '1'
|
||||
). "\n";
|
||||
}
|
||||
|
||||
$this->lighttpd_data[$vhost_filename].= '}' . "\n";
|
||||
@@ -453,15 +461,30 @@ class lighttpd {
|
||||
$vhost_content.= $this->getSslSettings($domain, $ssl_vhost);
|
||||
|
||||
if ($domain['specialsettings'] != "") {
|
||||
$vhost_content.= $domain['specialsettings'] . "\n";
|
||||
$vhost_content.= $this->processSpecialConfigTemplate(
|
||||
$domain['specialsettings'],
|
||||
$domain,
|
||||
$domain['ip'],
|
||||
$domain['port'],
|
||||
$ssl_vhost). "\n";
|
||||
}
|
||||
|
||||
if ($ipandport['default_vhostconf_domain'] != '') {
|
||||
$vhost_content.= $ipandport['default_vhostconf_domain'] . "\n";
|
||||
$vhost_content.= $this->processSpecialConfigTemplate(
|
||||
$ipandport['default_vhostconf_domain'],
|
||||
$domain,
|
||||
$domain['ip'],
|
||||
$domain['port'],
|
||||
$ssl_vhost) . "\n";
|
||||
}
|
||||
|
||||
if (Settings::Get('system.default_vhostconf') != '') {
|
||||
$vhost_content.= Settings::Get('system.default_vhostconf') . "\n";
|
||||
$vhost_content.= $this->processSpecialConfigTemplate(
|
||||
Settings::Get('system.default_vhostconf'),
|
||||
$domain,
|
||||
$domain['ip'],
|
||||
$domain['port'],
|
||||
$ssl_vhost). "\n";
|
||||
}
|
||||
}
|
||||
$vhost_content.= $this->getLogFiles($domain);
|
||||
|
||||
Reference in New Issue
Block a user