don't write http redirects to log all the time master
authorBernhard Tittelbach <bernhard@tittelbach.org>
Mon, 20 Jul 2026 13:05:48 +0000 (15:05 +0200)
committerBernhard Tittelbach <bernhard@tittelbach.org>
Mon, 20 Jul 2026 13:05:48 +0000 (15:05 +0200)
ansible/roles/nginx/templates/vhosts/default.j2

index 24e990d..e416593 100644 (file)
@@ -6,6 +6,9 @@ server {
 
     include snippets/acmetool.conf;
 
+    access_log off;
+    error_log syslog:server=unix:/dev/log,facility=local1,severity=info;
+
     location / {
         return 301 https://$host$request_uri;
     }
@@ -25,6 +28,9 @@ server {
 
     include snippets/security-headers.conf;
 
+    access_log off;
+    error_log syslog:server=unix:/dev/log,facility=local1,severity=info;
+
     location / {
         default_type text/plain;
         return 200 "Welcome to {{ ansible_host }}!";