Commit ba65ba3b authored by Till Brehm's avatar Till Brehm
Browse files

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
parents d50bd601 53c9ae52
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
\ No newline at end of file
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
ALTER TABLE `web_domain` ADD `log_retention` INT NOT NULL DEFAULT '30' AFTER `https_port`;
......@@ -1986,6 +1986,7 @@ CREATE TABLE `web_domain` (
`http_port` int(11) unsigned NOT NULL DEFAULT '80',
`https_port` int(11) unsigned NOT NULL DEFAULT '443',
`folder_directive_snippets` text,
`log_retention` int(11) NOT NULL DEFAULT '30',
PRIMARY KEY (`domain_id`),
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......
......@@ -917,7 +917,19 @@ if($_SESSION["s"]["user"]["typ"] == 'admin'
'value' => '',
'width' => '3',
'maxlength' => '6'
)
),
'log_retention' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^([0-9]{1,4})$/',
'errmsg'=> 'log_retention_error_regex'),
),
'default' => '30',
'value' => '',
'width' => '4',
'maxlength' => '4'
)
//#################################
// ENDE Datatable fields
//#################################
......
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'Porta HTTPS';
$wb['http_port_error_regex'] = 'Porta HTTP inválida.';
$wb['https_port_error_regex'] = 'Porta HTTPS inválida.';
$wb['enable_pagespeed_txt'] = 'Habilitar PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Log-Dateien Aufbewahrungszeit';
$wb['log_retention_error_regex'] = "Aufbewahrungszeit in Tagen (Erlaubte Werte: min. 0 - max. 9999)";
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -153,4 +153,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
......@@ -148,4 +148,6 @@ $wb['https_port_txt'] = 'HTTPS Port';
$wb['http_port_error_regex'] = 'HTTP Port invalid.';
$wb['https_port_error_regex'] = 'HTTPS Port invalid.';
$wb['enable_pagespeed_txt'] = 'Enable PageSpeed';
$wb['log_retention_txt'] = 'Logfiles retention time';
$wb['log_retention_error_regex'] = 'Retention time in days (allowed values: min. 0 - max. 9999)';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment