aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi4
-rw-r--r--gnu/services/web.scm9
2 files changed, 11 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 13b42f59f3..e734147681 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15938,6 +15938,10 @@ use the size of the processors cache line.
@item @code{server-names-hash-bucket-max-size} (default: @code{#f})
Maximum bucket size for the server names hash tables.
+@item @code{extra-content} (default: @code{""})
+Extra content for the @code{http} block. Should be string or a string
+valued G-expression.
+
@end table
@end deffn
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index aae2f3db0d..9a58eff5ef 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -77,6 +77,7 @@
nginx-configuration-upstream-blocks
nginx-configuration-server-names-hash-bucket-size
nginx-configuration-server-names-hash-bucket-max-size
+ nginx-configuration-extra-content
nginx-configuration-file
<nginx-server-configuration>
@@ -431,6 +432,8 @@
(default #f))
(server-names-hash-bucket-max-size nginx-configuration-server-names-hash-bucket-max-size
(default #f))
+ (extra-content nginx-configuration-extra-content
+ (default ""))
(file nginx-configuration-file ;#f | string | file-like
(default #f)))
@@ -521,7 +524,8 @@ of index files."
(nginx log-directory run-directory
server-blocks upstream-blocks
server-names-hash-bucket-size
- server-names-hash-bucket-max-size)
+ server-names-hash-bucket-max-size
+ extra-content)
(apply mixed-text-file "nginx.conf"
(flatten
"user nginx nginx;\n"
@@ -550,7 +554,8 @@ of index files."
"\n"
(map emit-nginx-upstream-config upstream-blocks)
(map emit-nginx-server-config server-blocks)
- "}\n"
+ extra-content
+ "\n}\n"
"events {}\n"))))
(define %nginx-accounts