Skip to content

Commit ba65ba3

Browse files
author
Till Brehm
committed
Merge branch 'stable-3.1' into 'stable-3.1'
Make the webserver's rentention time for log files configurable This feature ditches the current static 30 days approach of logfile purging and introduces a configurable retention time for each website. The retention time configuration can be found in the options tab of the website settings. Default retention time is the current 30 days value. However, by this approach it's possible to have retention times like 0 (forever), or very short retention times like 7 days which are often demanded by public/government data security officials which we have in germany. See merge request !576
2 parents d50bd60 + 53c9ae5 commit ba65ba3

29 files changed

+80
-16
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
1+
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
2+
ALTER TABLE `web_domain` ADD `log_retention` INT NOT NULL DEFAULT '30' AFTER `https_port`;

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,7 @@ CREATE TABLE `web_domain` (
19861986
`http_port` int(11) unsigned NOT NULL DEFAULT '80',
19871987
`https_port` int(11) unsigned NOT NULL DEFAULT '443',
19881988
`folder_directive_snippets` text,
1989+
`log_retention` int(11) NOT NULL DEFAULT '30',
19891990
PRIMARY KEY (`domain_id`),
19901991
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
19911992
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

interface/web/sites/form/web_vhost_domain.tform.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,19 @@
917917
'value' => '',
918918
'width' => '3',
919919
'maxlength' => '6'
920-
)
920+
),
921+
'log_retention' => array (
922+
'datatype' => 'INTEGER',
923+
'formtype' => 'TEXT',
924+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
925+
'regex' => '/^([0-9]{1,4})$/',
926+
'errmsg'=> 'log_retention_error_regex'),
927+
),
928+
'default' => '30',
929+
'value' => '',
930+
'width' => '4',
931+
'maxlength' => '4'
932+
)
921933
//#################################
922934
// ENDE Datatable fields
923935
//#################################

interface/web/sites/lib/lang/ar_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
148148
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
149149
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
150150
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
151+
$wb['log_retention_txt'] = 'Logfiles retention time';
152+
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
151153
?>

interface/web/sites/lib/lang/bg_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
148148
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
149149
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
150150
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
151+
$wb['log_retention_txt'] = 'Logfiles retention time';
152+
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
151153
?>

interface/web/sites/lib/lang/br_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'Porta HTTPS';
148148
$wb['http_port_error_regex'] = 'Porta HTTP inválida.';
149149
$wb['https_port_error_regex'] = 'Porta HTTPS inválida.';
150150
$wb['enable_pagespeed_txt'] = 'Habilitar PageSpeed';
151+
$wb['log_retention_txt'] = 'Logfiles retention time';
152+
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
151153
?>

interface/web/sites/lib/lang/ca_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
148148
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
149149
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
150150
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
151+
$wb['log_retention_txt'] = 'Logfiles retention time';
152+
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
151153
?>

interface/web/sites/lib/lang/cz_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
148148
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
149149
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
150150
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
151+
$wb['log_retention_txt'] = 'Logfiles retention time';
152+
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
151153
?>

interface/web/sites/lib/lang/de_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
148148
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
149149
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
150150
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
151+
$wb['log_retention_txt'] = 'Log-Dateien Aufbewahrungszeit';
152+
$wb['log_retention_error_regex'] = "Aufbewahrungszeit in Tagen (Erlaubte Werte: min. 0 - max. 9999)";
151153
?>

interface/web/sites/lib/lang/dk_web_vhost_domain.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
148148
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
149149
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
150150
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
151+
$wb['log_retention_txt'] = 'Logfiles retention time';
152+
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
151153
?>

0 commit comments

Comments
 (0)