also add logfiles to virtual-host if it's a redirect

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2024-03-27 10:17:02 +01:00
parent bb83e78c64
commit ff4c54a9d5
3 changed files with 3 additions and 0 deletions

View File

@@ -823,6 +823,7 @@ class Apache extends HttpConfigBase
$modrew_red = ' [R=' . $code . ';L,NE]';
}
$vhost_content .= $this->getLogfiles($domain);
// redirect everything, not only root-directory, #541
$vhost_content .= ' <IfModule mod_rewrite.c>' . "\n";
$vhost_content .= ' RewriteEngine On' . "\n";

View File

@@ -406,6 +406,7 @@ class Lighttpd extends HttpConfigBase
// Get domain's redirect code
$code = Domain::getDomainRedirectCode($domain['id']);
$vhost_content .= $this->getLogFiles($domain);
$vhost_content .= ' url.redirect-code = ' . $code . "\n";
$vhost_content .= ' url.redirect = (' . "\n";
$vhost_content .= ' "^/(.*)$" => "' . $uri . '$1"' . "\n";

View File

@@ -604,6 +604,7 @@ class Nginx extends HttpConfigBase
// Get domain's redirect code
$code = Domain::getDomainRedirectCode($domain['id']);
$vhost_content .= $this->getLogFiles($domain);
$vhost_content .= "\t" . 'location / {' . "\n";
$vhost_content .= "\t\t" . 'return ' . $code . ' ' . $uri . '$request_uri;' . "\n";
$vhost_content .= "\t" . '}' . "\n";