From f0cd25ebea00cea6f4cac86047deec4776a3b804 Mon Sep 17 00:00:00 2001
From: Andreas Kempe <kempe@lysator.liu.se>
Date: Wed, 23 Sep 2020 20:18:07 +0200
Subject: [PATCH] hina: nginx: add anonymous access log

---
 files/hina/nginx.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/files/hina/nginx.conf b/files/hina/nginx.conf
index df938c1..bf9382b 100644
--- a/files/hina/nginx.conf
+++ b/files/hina/nginx.conf
@@ -44,12 +44,17 @@ http {
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" - "$http_x_forwarded_for"';
 
+    log_format  anon  '- - - [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent"';
+
     server {
         listen       80;
         listen       [::]:80;
         server_name  hina;
 
         access_log  /var/log/nginx/access.log  main;
+        access_log  /var/log/nginx/anon_access.log anon;
 
         location / {
             root   /var/ftp;
@@ -79,6 +84,7 @@ http {
         server_name  hina;
 
         access_log  /var/log/nginx/access.log main;
+        access_log  /var/log/nginx/anon_access.log anon;
 
         ssl_dhparam /usr/local/etc/nginx/dhparam.pem;
 
-- 
GitLab