aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-10-20 20:01:18 -0700
committerEugene Triguba <hello@eugenetriguba.com>2026-10-20 20:01:30 -0700
commitca3dd832069e35d75356f31f1cb19e1c36494a3e (patch)
tree53d750618c7d1b854b0a1e8acd5a8f17c52fe09b
parentFix typo in cgitrc (diff)
downloadsite-configs-ca3dd832069e35d75356f31f1cb19e1c36494a3e.zip
Use separate log files per domain with httpd
-rw-r--r--roles/obsd_cgit/templates/httpd.d/git.conf.j22
-rw-r--r--roles/obsd_ssl/templates/httpd.d/ssl.conf2
-rw-r--r--roles/obsd_www/templates/httpd.d/www.conf.j22
3 files changed, 6 insertions, 0 deletions
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"