Adjujstments for logrotate

This commit is contained in:
Charlie Root 2023-12-07 13:05:56 +01:00
parent 8c91b846a7
commit 4e4d8b57b2
2 changed files with 8 additions and 3 deletions

View File

@ -23,8 +23,10 @@
RewriteRule "^/.well-known/acme-challenge/" - [L] RewriteRule "^/.well-known/acme-challenge/" - [L]
DocumentRoot "{{vars.apache_vhost.site.doc_root}}" DocumentRoot "{{vars.apache_vhost.site.doc_root}}"
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}} ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
{{#vars.apache_vhost.site.logging80}}
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log" ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
{{/vars.apache_vhost.site.logging80}}
{{vars.apache_vhost.site.raw}} {{vars.apache_vhost.site.raw}}
</VirtualHost> </VirtualHost>
{{/vars.apache_vhost.site.ssl}} {{/vars.apache_vhost.site.ssl}}
@ -44,8 +46,11 @@
DocumentRoot "{{vars.apache_vhost.site.doc_root}}" DocumentRoot "{{vars.apache_vhost.site.doc_root}}"
ServerName {{vars.apache_vhost.site.domain}} ServerName {{vars.apache_vhost.site.domain}}
ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}} ServerAlias {{#vars.apache_vhost.site.aliases}}{{.}} {{/vars.apache_vhost.site.aliases}}
{{#vars.apache_vhost.site.logging443}}
ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log" ErrorLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-error.log"
CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined CustomLog "{{vars.apache.log_dir}}/{{vars.apache_vhost.site.domain}}-access.log" combined
{{/vars.apache_vhost.site.logging443}}
# SSL # SSL
SSLEngine on SSLEngine on
# SSLCertificateFile {{vars.certbot.certbot_dir}}/live/{{vars.apache_vhost.site.domain}}/fullchain.pem # SSLCertificateFile {{vars.certbot.certbot_dir}}/live/{{vars.apache_vhost.site.domain}}/fullchain.pem

View File

@ -1,6 +1,6 @@
{{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-access.log { {{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-access.log {
rotate 100 rotate 30
size 1024k size 100k
postrotate postrotate
service {{vars.apache.service_name}} restart ; {{{vars.apache_matomo.logger_script}}} service {{vars.apache.service_name}} restart ; {{{vars.apache_matomo.logger_script}}}
@ -8,7 +8,7 @@
} }
{{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-error.log { {{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-error.log {
rotate 100 rotate 30
size 100k size 100k
postrotate postrotate