From: Tomas Volf <~@wolfsden.cz>
To: 71673@debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#71673] [PATCH v2] services: nginx: Print extra-content before the server-blocks.
Date: Sun, 6 Oct 2024 17:40:14 +0200 [thread overview]
Message-ID: <e3157a86723b2f74fe7ab16465c12e4668ccce33.1728229214.git.~@wolfsden.cz> (raw)
In-Reply-To: <fd941dd1a6549e891f4afa3293a1f262350e0fa9.1718882088.git.~@wolfsden.cz>
The configuration file is processed sequentially, which meant that there was
no way to set for example log format shared between the server-blocks, because
the final configuration file would have this order:
...
http {
...
server {
}
...
$extra-content
}
Moving the extra-content before the serialization of server-blocks resolves
this.
* gnu/services/web.scm (default-nginx-config): Move extra-content before
server-blocks.
Change-Id: Ie8286a533dfed575abc58a0f4800706b3ad6adc2
---
Rebase on latest master.
gnu/services/web.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index cc6f4e6d9b..84ce88aa80 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -770,10 +770,7 @@ (define (default-nginx-config config)
(number->string server-names-hash-bucket-max-size)
";\n")
"")
- "\n"
- (map emit-nginx-upstream-config upstream-blocks)
- (map emit-nginx-server-config server-blocks)
- (match extra-content
+ (match extra-content
((? list? extra-content)
(map (lambda (line)
`(" " ,line "\n"))
@@ -781,7 +778,10 @@ (define (default-nginx-config config)
;; XXX: For compatibility strings and gexp's are inserted
;; directly.
(_ extra-content))
- "\n}\n"))))
+ "\n"
+ (map emit-nginx-upstream-config upstream-blocks)
+ (map emit-nginx-server-config server-blocks)
+ "}\n"))))
(define %nginx-accounts
(list (user-group (name "nginx") (system? #t))
--
2.46.0
next prev parent reply other threads:[~2024-10-06 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 11:14 [bug#71673] [PATCH] services: nginx: Print extra-content before the server-blocks Tomas Volf
2024-10-06 15:40 ` Tomas Volf [this message]
2024-11-20 22:39 ` bug#71673: [PATCH v2] " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e3157a86723b2f74fe7ab16465c12e4668ccce33.1728229214.git.~@wolfsden.cz' \
--to=~@wolfsden.cz \
--cc=71673@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).