From ca3dd832069e35d75356f31f1cb19e1c36494a3e Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Tue, 20 Oct 2026 20:01:18 -0700 Subject: Use separate log files per domain with httpd --- roles/obsd_cgit/templates/httpd.d/git.conf.j2 | 2 ++ roles/obsd_ssl/templates/httpd.d/ssl.conf | 2 ++ roles/obsd_www/templates/httpd.d/www.conf.j2 | 2 ++ 3 files changed, 6 insertions(+) diff --git a/roles/obsd_cgit/templates/httpd.d/git.conf.j2 b/roles/obsd_cgit/templates/httpd.d/git.conf.j2 index d309057..15e2f05 100644 --- a/roles/obsd_cgit/templates/httpd.d/git.conf.j2 +++ b/roles/obsd_cgit/templates/httpd.d/git.conf.j2 @@ -1,5 +1,7 @@ server "{{ obsd_cgit_domain }}" { listen on egress tls port 443 + log access "{{ obsd_cgit_domain }}-access.log" + log error "{{ obsd_cgit_domain }}-error.log" tls { certificate "/etc/ssl/{{ obsd_cgit_domain }}.fullchain.pem" key "/etc/ssl/private/{{ obsd_cgit_domain }}.key" diff --git a/roles/obsd_ssl/templates/httpd.d/ssl.conf b/roles/obsd_ssl/templates/httpd.d/ssl.conf index 0576580..be3b53e 100644 --- a/roles/obsd_ssl/templates/httpd.d/ssl.conf +++ b/roles/obsd_ssl/templates/httpd.d/ssl.conf @@ -1,6 +1,8 @@ {% for domain in obsd_ssl_domains %} server "{{ domain.name }}" { listen on * port 80 + log access "{{ domain.name }}-access.log" + log error "{{ domain.name }}-error.log" location "/.well-known/acme-challenge/*" { root "/acme" request strip 2 diff --git a/roles/obsd_www/templates/httpd.d/www.conf.j2 b/roles/obsd_www/templates/httpd.d/www.conf.j2 index 76a9bd5..85ba4ba 100644 --- a/roles/obsd_www/templates/httpd.d/www.conf.j2 +++ b/roles/obsd_www/templates/httpd.d/www.conf.j2 @@ -2,6 +2,8 @@ server "{{ obsd_domain }}" { {% if obsd_alias_domain is defined %} alias "{{ obsd_alias_domain }}" {% endif %} + log access "{{ obsd_domain }}-access.log" + log error "{{ obsd_domain }}-error.log" listen on egress tls port 443 tls { certificate "/etc/ssl/{{ obsd_domain }}.fullchain.pem" -- cgit v1.2.3