about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/forge/klaus.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/forge/klaus.scm b/guix/forge/klaus.scm
index c180e46..cb5815d 100644
--- a/guix/forge/klaus.scm
+++ b/guix/forge/klaus.scm
@@ -105,9 +105,17 @@
     (list (nginx-server-configuration
            (server-name (list server-name))
            (locations
+            ;; Based on
+            ;; https://github.com/jonashaag/klaus/wiki/Klaus-behind-a-reverse-proxy#nginx-example
             (list (nginx-location-configuration
                    (uri "/")
-                   (body (list (socket->nginx-proxy-pass socket))))))))))
+                   (body (list (socket->nginx-proxy-pass socket)
+                               ;; Pass in the header fields of the original
+                               ;; request.
+                               "proxy_pass_request_headers on;"
+                               ;; Let klaus know which domain the request was
+                               ;; received for.
+                               "proxy_set_header Host $host;")))))))))
 
 (define klaus-service-type
   (service-type