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:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user