From f4245d9435ffa2693f9175c1daa50c6e57128d5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Oliver=20B=C3=B6ttcher?= Date: Wed, 11 Jul 2018 11:33:19 +0200 Subject: [PATCH] BMF - httpd logs rotate every day 30 days --- customer/bmf-datacenter/common.yaml | 1 + customer/bmf-datacenter/production.yaml | 13 +++++++++++++ customer/bmf-europa/common.yaml | 3 ++- .../web-so-klingt-europa-de.pixelpark.net.yaml | 13 +++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/customer/bmf-datacenter/common.yaml b/customer/bmf-datacenter/common.yaml index 0d5a0afe..baea1fdd 100644 --- a/customer/bmf-datacenter/common.yaml +++ b/customer/bmf-datacenter/common.yaml @@ -34,6 +34,7 @@ infra::role: base infra::additional_classes: - infra::profile::typo3 - infra::profile::mysql_server + - infra::profile::logrotate - solr - java diff --git a/customer/bmf-datacenter/production.yaml b/customer/bmf-datacenter/production.yaml index 78b09af1..70917ddd 100644 --- a/customer/bmf-datacenter/production.yaml +++ b/customer/bmf-datacenter/production.yaml @@ -131,3 +131,16 @@ solr::cores: - /var/solr-typo3/typo3cores/german/conf/general_schema_types.xml - /var/solr-typo3/typo3cores/german/conf/german-common-nouns.txt - /var/solr-typo3/typo3cores/german/conf/_schema_analysis_stopwords_german.json + +infra::profile::logrotate::rules: + httpd: + path: + - '/var/log/httpd/*log' + rotate: 30 + rotate_every: 'day' + missingok: true + ifempty: false + sharedscripts: true + delaycompress: true + minsize: '4M' + postrotate: '/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true' diff --git a/customer/bmf-europa/common.yaml b/customer/bmf-europa/common.yaml index 32eb5ec7..2e60c9bd 100644 --- a/customer/bmf-europa/common.yaml +++ b/customer/bmf-europa/common.yaml @@ -38,7 +38,7 @@ accounts::users: group: apache thomas.bussmeyer: apply: true - sudo: true + sudo: true sudo::configs: becomeApache: @@ -51,6 +51,7 @@ infra::additional_classes: - infra::profile::mysql_server - infra::profile::wordpress - infra::profile::drupal + - infra::profile::logrotate repo::remi_php70: true apache::default_vhost: false diff --git a/customer/bmf-europa/web-so-klingt-europa-de.pixelpark.net.yaml b/customer/bmf-europa/web-so-klingt-europa-de.pixelpark.net.yaml index 956a70b0..aa30fe26 100644 --- a/customer/bmf-europa/web-so-klingt-europa-de.pixelpark.net.yaml +++ b/customer/bmf-europa/web-so-klingt-europa-de.pixelpark.net.yaml @@ -96,3 +96,16 @@ infra::profile::drupal::projects: - '%%{ich-trickse}{HTTP_HOST} !^www\.reichsfinanzministerium-geschichte\.de [NC]' rewrite_rule: - '^(.*)$ http://www.reichsfinanzministerium-geschichte.de$1 [L,R=301]' + +infra::profile::logrotate::rules: + httpd: + path: + - '/var/log/httpd/*log' + rotate: 30 + rotate_every: 'day' + missingok: true + ifempty: false + sharedscripts: true + delaycompress: true + minsize: '4M' + postrotate: '/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true' -- 2.39.5