only include acme.conf to vhosts if system has ssl and LE enabled (might not exist if not)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-04-15 15:09:11 +02:00
parent e8f5fc1a8a
commit 28f0c3eac4

View File

@@ -422,7 +422,11 @@ class nginx extends HttpConfigBase {
) {
$vhost_content.= "\n" . $this->composeSslSettings($domain) . "\n";
}
if (Settings::Get('system.use_ssl') == '1' && Settings::Get('system.leenabled') == '1')
{
$vhost_content.= "\t".'include /etc/nginx/acme.conf;'."\n";
}
// if the documentroot is an URL we just redirect
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {