mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
services: nginx: Print extra-content before the server-blocks.
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 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
b5e7f2a65a
commit
123dcaefe9
1 changed files with 5 additions and 5 deletions
|
@ -771,9 +771,6 @@ (define (default-nginx-config config)
|
||||||
(number->string server-names-hash-bucket-max-size)
|
(number->string server-names-hash-bucket-max-size)
|
||||||
";\n")
|
";\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)
|
((? list? extra-content)
|
||||||
(map (lambda (line)
|
(map (lambda (line)
|
||||||
|
@ -782,7 +779,10 @@ (define (default-nginx-config config)
|
||||||
;; XXX: For compatibility strings and gexp's are inserted
|
;; XXX: For compatibility strings and gexp's are inserted
|
||||||
;; directly.
|
;; directly.
|
||||||
(_ extra-content))
|
(_ extra-content))
|
||||||
"\n}\n"))))
|
"\n"
|
||||||
|
(map emit-nginx-upstream-config upstream-blocks)
|
||||||
|
(map emit-nginx-server-config server-blocks)
|
||||||
|
"}\n"))))
|
||||||
|
|
||||||
(define %nginx-accounts
|
(define %nginx-accounts
|
||||||
(list (user-group (name "nginx") (system? #t))
|
(list (user-group (name "nginx") (system? #t))
|
||||||
|
|
Loading…
Reference in a new issue