Merge branch 'master' into vhost_config_variables, and replace IS_SSL with SCHEME
Conflicts (resolved): lng/english.lng.php lng/german.lng.php
This commit is contained in:
@@ -169,15 +169,28 @@ class lighttpd extends HttpConfigBase {
|
||||
}
|
||||
|
||||
if ($row_ipsandports['ssl_cert_file'] != '') {
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.use-sslv2 = "disable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.cipher-list = "' . Settings::Get('system.ssl_cipher_list') . '"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.honor-cipher-order = "enable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . makeCorrectFile($row_ipsandports['ssl_cert_file']) . '"' . "\n";
|
||||
|
||||
if ($row_ipsandports['ssl_ca_file'] != '') {
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.ca-file = "' . makeCorrectFile($row_ipsandports['ssl_ca_file']) . '"' . "\n";
|
||||
}
|
||||
|
||||
// check for existence, #1485
|
||||
if (!file_exists($row_ipsandports['ssl_cert_file'])) {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_ERROR, $ip.':'.$port . ' :: certificate file "'.$row_ipsandports['ssl_cert_file'].'" does not exist! Cannot create ssl-directives');
|
||||
echo $ip.':'.$port . ' :: certificate file "'.$row_ipsandports['ssl_cert_file'].'" does not exist! Cannot create SSL-directives'."\n";
|
||||
} else {
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.engine = "enable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.use-sslv2 = "disable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.cipher-list = "' . Settings::Get('system.ssl_cipher_list') . '"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.honor-cipher-order = "enable"' . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.pemfile = "' . makeCorrectFile($row_ipsandports['ssl_cert_file']) . '"' . "\n";
|
||||
|
||||
if ($row_ipsandports['ssl_ca_file'] != '') {
|
||||
// check for existence, #1485
|
||||
if (!file_exists($row_ipsandports['ssl_ca_file'])) {
|
||||
$this->logger->logAction(CRON_ACTION, LOG_ERROR, $ip.':'.$port . ' :: certificate CA file "'.$row_ipsandports['ssl_ca_file'].'" does not exist! Cannot create ssl-directives');
|
||||
echo $ip.':'.port . ' :: certificate CA file "'.$row_ipsandports['ssl_ca_file'].'" does not exist! SSL-directives might not be working'."\n";
|
||||
} else {
|
||||
$this->lighttpd_data[$vhost_filename].= 'ssl.ca-file = "' . makeCorrectFile($row_ipsandports['ssl_ca_file']) . '"' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +320,7 @@ class lighttpd extends HttpConfigBase {
|
||||
$_pos = strrpos($_tmp_path, '/');
|
||||
$_inc_path = substr($_tmp_path, $_pos+1);
|
||||
|
||||
// subdomain
|
||||
// maindomain
|
||||
if ((int)$domain['parentdomainid'] == 0
|
||||
&& isCustomerStdSubdomain((int)$domain['id']) == false
|
||||
&& ((int)$domain['ismainbutsubto'] == 0
|
||||
@@ -322,9 +335,10 @@ class lighttpd extends HttpConfigBase {
|
||||
) {
|
||||
$vhost_no = '51';
|
||||
}
|
||||
// main domain
|
||||
// subdomains
|
||||
else {
|
||||
$vhost_no = '52';
|
||||
// number of dots in a domain specifies it's position (and depth of subdomain) starting at 89 going downwards on higher depth
|
||||
$vhost_no = (string)(90 - substr_count($domain['domain'], ".") + 1);
|
||||
}
|
||||
|
||||
if ($ssl == '1') {
|
||||
@@ -499,6 +513,7 @@ class lighttpd extends HttpConfigBase {
|
||||
}
|
||||
|
||||
if ($domain['ssl_cert_file'] != '') {
|
||||
|
||||
$ssl_settings.= 'ssl.engine = "enable"' . "\n";
|
||||
$ssl_settings.= 'ssl.use-sslv2 = "disable"' . "\n";
|
||||
$ssl_settings.= 'ssl.cipher-list = "' . Settings::Get('system.ssl_cipher_list') . '"' . "\n";
|
||||
|
||||
Reference in New Issue
Block a user