[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/18: services: nginx: Don't emit empty fields
From: |
guix-commits |
Subject: |
16/18: services: nginx: Don't emit empty fields |
Date: |
Mon, 26 Sep 2022 17:32:10 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 75e7c094615f063b1018526c4c72838dd3173989
Author: Simen Endsjø <simendsjo@gmail.com>
AuthorDate: Fri Sep 16 09:50:37 2022 +0200
services: nginx: Don't emit empty fields
An empty root or index field is an error in nginx.
* gnu/services/web.scm (emit-nginx-server-config): Don't emit root or
index fields when they are empty
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/services/web.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
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 <arunisaac@systemreboot.net>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
+;;; Copyright © 2022 Simen Endsjø <simendsjo@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -646,8 +647,12 @@ of index files."
" 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")
"")
- 01/18: machine: ssh: Parameterize '%current-system' early on., (continued)
- 01/18: machine: ssh: Parameterize '%current-system' early on., guix-commits, 2022/09/26
- 06/18: download: Switch savannah mirrors to HTTPS URLs., guix-commits, 2022/09/26
- 09/18: gnu-maintenance: Simplify latest-kernel.org-release., guix-commits, 2022/09/26
- 13/18: gnu: Add texlive-babel-polish., guix-commits, 2022/09/26
- 14/18: gnu: gnome-boxes: Patch 'qemu-img' file name., guix-commits, 2022/09/26
- 12/18: gnu: Add ec., guix-commits, 2022/09/26
- 05/18: gnu-maintenance: Produce mirror:// URIs in latest-html-release., guix-commits, 2022/09/26
- 10/18: gnu-maintenance: Remove unused procedures., guix-commits, 2022/09/26
- 11/18: gnu-maintenance: Test latest-html-release., guix-commits, 2022/09/26
- 15/18: debug-link: Clarify what CRC is., guix-commits, 2022/09/26
- 16/18: services: nginx: Don't emit empty fields,
guix-commits <=
- 17/18: gnu: busybox: Fix cross-compilation., guix-commits, 2022/09/26
- 18/18: file-systems: Add cgroup2 to %pseudo-file-system-types., guix-commits, 2022/09/26
- 04/18: gnu-maintenance: Produce mirror:// URIs in latest-ftp-release., guix-commits, 2022/09/26
- 07/18: gnu-maintenance: Simplify latest-savannah-release., guix-commits, 2022/09/26
- 08/18: download: Add a kernel.org mirror., guix-commits, 2022/09/26
- 03/18: lint: Extract logic of 'check-mirror-url'., guix-commits, 2022/09/26