From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 14 Dec 2018 22:01:46 +0000 (+0100)
Subject: Use XSLT stylesheet for IRClogs root autoindex.
X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/templates?a=commitdiff_plain;h=3365a1e1ca1ebbafb6cd78d1b5d2459e654861a0;p=config

Use XSLT stylesheet for IRClogs root autoindex.
---

diff --git a/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf b/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf
index 798d791..adb2cc1 100644
--- a/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf
+++ b/all_new_2018/linkable_etc_files/web/etc/nginx/nginx.conf
@@ -3,6 +3,9 @@ user www-data;
 worker_processes auto;
 pid /run/nginx.pid;
 
+# we need this for the xslt_stylesheet directive below
+load_module modules/ngx_http_xslt_filter_module.so;
+
 # is expected even if empty
 events {
 }
@@ -64,14 +67,18 @@ http {
             fastcgi_pass unix:/var/run/fcgiwrap.socket;
         }
 
+        # login-protected IRC logs
         location ~ /irclogs/([^/]+)/ {
             auth_basic "$1 logs";
             auth_basic_user_file /var/www/irclogs_pw/$1;
             autoindex on;
         }
 
+        # entry for IRC logs
         location /irclogs/ {
             autoindex on;
+            autoindex_format xml;
+            xslt_stylesheet /var/www/autoindex.xslt
         }
     }
 }