aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-04-28 17:10:03 -0300
committerEuAndreh <eu@euandre.org>2025-04-28 21:18:06 -0300
commit3bdd7fdc12be46c6210438fd3b2fc8c024156018 (patch)
tree19e840ee672d9afe39f59ed74357fd549c431d86
parentsrc/guix/system.scm: Get fail2ban-service-type from pkg:base-packages (diff)
downloadserver-3bdd7fdc12be46c6210438fd3b2fc8c024156018.tar.gz
server-3bdd7fdc12be46c6210438fd3b2fc8c024156018.tar.xz
src/guix/system.scm: Remove trailing index.html from nginx config
-rw-r--r--src/guix/system.scm9
1 files changed, 9 insertions, 0 deletions
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,11 +76,20 @@
(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
'(#"-