Skip to content

Commit

Permalink
also add logfiles to virtual-host if it's a redirect
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Mar 27, 2024
1 parent bb83e78 commit ff4c54a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Froxlor/Cron/Http/Apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ protected function getVhostContent($domain, $ssl_vhost = false)
$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";
Expand Down
1 change: 1 addition & 0 deletions lib/Froxlor/Cron/Http/Lighttpd.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ protected function getVhostContent($domain, $ssl_vhost = false, $ipid = 0)
// 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";
Expand Down
1 change: 1 addition & 0 deletions lib/Froxlor/Cron/Http/Nginx.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ protected function getVhostContent($domain, $ssl_vhost = false)
// 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";
Expand Down

0 comments on commit ff4c54a

Please sign in to comment.