diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 5bac496f01..e347f5dbcc 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Oleg Pykhalov ;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton +;;; Copyright © 2022 Simen Endsjø ;;; ;;; This file is part of GNU Guix. ;;; @@ -646,8 +647,12 @@ (define-syntax-rule (and/l x tail ...) " server_name " (config-domain-strings server-name) ";\n" (and/l ssl-certificate " ssl_certificate " <> ";\n") (and/l ssl-certificate-key " ssl_certificate_key " <> ";\n") - " root " root ";\n" - " index " (config-index-strings index) ";\n" + (if (not (equal? "" root)) + (list " root " root ";\n") + "") + (if (not (null? index)) + (list " index " (config-index-strings index) ";\n") + "") (if (not (nil? try-files)) (and/l (config-index-strings try-files) " try_files " <> ";\n") "")