From ff4c54a9d5445819f13214ebff763732f7fd99cd Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Wed, 27 Mar 2024 10:17:02 +0100 Subject: [PATCH] also add logfiles to virtual-host if it's a redirect Signed-off-by: Michael Kaufmann --- lib/Froxlor/Cron/Http/Apache.php | 1 + lib/Froxlor/Cron/Http/Lighttpd.php | 1 + lib/Froxlor/Cron/Http/Nginx.php | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/Froxlor/Cron/Http/Apache.php b/lib/Froxlor/Cron/Http/Apache.php index f3fe3f6b..609f9164 100644 --- a/lib/Froxlor/Cron/Http/Apache.php +++ b/lib/Froxlor/Cron/Http/Apache.php @@ -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 .= ' ' . "\n"; $vhost_content .= ' RewriteEngine On' . "\n"; diff --git a/lib/Froxlor/Cron/Http/Lighttpd.php b/lib/Froxlor/Cron/Http/Lighttpd.php index 968ab62c..92478a94 100644 --- a/lib/Froxlor/Cron/Http/Lighttpd.php +++ b/lib/Froxlor/Cron/Http/Lighttpd.php @@ -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"; diff --git a/lib/Froxlor/Cron/Http/Nginx.php b/lib/Froxlor/Cron/Http/Nginx.php index 49246134..fe951784 100644 --- a/lib/Froxlor/Cron/Http/Nginx.php +++ b/lib/Froxlor/Cron/Http/Nginx.php @@ -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";