home · contact · privacy
Add setup for play.plomlompom.com
[config] / all_new_2018 / linkable_etc_files / web / etc / nginx / nginx.conf
index fa1f106e6bcb8209a685b3fcb4025183fd12813c..f1be9e63b3510ed218e95ab94294dbfb507aad28 100644 (file)
@@ -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 {
 }
@@ -13,7 +16,7 @@ http {
         text/html html htm shtml;
         text/css css;
         text/xml xml;
-        text/plain txt sh rst md;
+        text/plain txt sh rst md asc;
         application/xhtml+xml xhtml;
         application/pdf pdf;
         image/jpeg jpg jpeg;
@@ -64,8 +67,18 @@ http {
             fastcgi_pass unix:/var/run/fcgiwrap.socket;
         }
 
-        location /irclogs/plomlompomtest/ {
+        # 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;
+        #}
     }
 }