From 3bdd7fdc12be46c6210438fd3b2fc8c024156018 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 28 Apr 2025 17:10:03 -0300 Subject: src/guix/system.scm: Remove trailing index.html from nginx config --- src/guix/system.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/guix/system.scm b/src/guix/system.scm index 1bcdfc3..91d39d0 100644 --- a/src/guix/system.scm +++ b/src/guix/system.scm @@ -76,10 +76,19 @@ (server-name (list +tld+)) (listen '("[::]:443 ssl" "443 ssl")) (root "/srv/www") + (index '()) (ssl-certificate (pkg:fmt "/etc/letsencrypt/live/~a/fullchain.pem" +tld+)) (ssl-certificate-key (pkg:fmt "/etc/letsencrypt/live/~a/privkey.pem" +tld+)) (locations (list + (nginx-location-configuration + (uri "~ ^(.*)/index\\.html$") + (body + '(#"- + if ($request_uri ~ /index\.html$) { + rewrite ^(.*)/index\.html$ $1/ permanent; + } + "#))) (nginx-location-configuration (uri "/live/") (body -- cgit v1.2.3