GNU bug report logs -
#71673
[PATCH] services: nginx: Print extra-content before the server-blocks.
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Thu, 20 Jun 2024 11:17:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#71673: [PATCH] services: nginx: Print extra-content before the server-blocks.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 71673 <at> debbugs.gnu.org.
--
71673: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71673
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Tomas Volf <~@wolfsden.cz> skribis:
> 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
Applied, thanks!
[Message part 3 (message/rfc822, inline)]
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
---
While this I assume *could* be considered a backwards incompatible change, I
cannot really think of anything that it would break.
gnu/services/web.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 406117c457..e3887d0ed8 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -768,11 +768,11 @@ (define (default-nginx-config config)
(number->string server-names-hash-bucket-max-size)
";\n")
"")
+ extra-content
"\n"
(map emit-nginx-upstream-config upstream-blocks)
(map emit-nginx-server-config server-blocks)
- extra-content
- "\n}\n"))))
+ "}\n"))))
(define %nginx-accounts
(list (user-group (name "nginx") (system? #t))
--
2.45.1
This bug report was last modified 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.