do not create vhost content for ssl-vhosts that do not have a ssl-certificate specified, fixes #1583
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -818,6 +818,13 @@ class apache extends HttpConfigBase {
|
||||
$vhost_content .= ' SSLCertificateChainFile ' . makeCorrectFile($domain['ssl_cert_chainfile']) . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// if there is no cert-file specified but we are generating a ssl-vhost,
|
||||
// we should return an empty string because this vhost would suck dick, ref #1583
|
||||
$this->logger->logAction(CRON_ACTION, LOG_ERROR, $domain['domain'] . ' :: empty certificate file! Cannot create ssl-directives');
|
||||
return '# no ssl-certificate was specified for this domain, therefore no explicit vhost is being generated';
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||
|
||||
Reference in New Issue
Block a user