do not ssl-redirect when let's encrypt tries to validate the domain, fixes #1649

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-08-25 22:08:32 +02:00
parent a47ab55cdd
commit 2f6e34d878

View File

@@ -861,10 +861,14 @@ class apache extends HttpConfigBase {
if (!$ssl_vhost) {
$vhost_content .= ' RewriteCond %{HTTPS} off' . "\n";
}
if ($domain['letsencrypt'] == '1') {
$vhost_content .= ' RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge' . "\n";
}
$vhost_content .= ' RewriteRule ^/(.*) '. $corrected_docroot.'$1' . $modrew_red . "\n";
$vhost_content .= ' </IfModule>' . "\n";
$vhost_content .= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
$vhost_content .= ' <IfModule !mod_rewrite.c>'."\n";
$vhost_content .= ' Redirect '.$code.' / ' . $this->idnaConvert->encode($domain['documentroot']) . "\n";
$vhost_content .= ' </IfModule>' . "\n";
} else {