aboutsummaryrefslogtreecommitdiff
path: root/genenetwork/services/genenetwork.scm
diff options
context:
space:
mode:
Diffstat (limited to 'genenetwork/services/genenetwork.scm')
-rw-r--r--genenetwork/services/genenetwork.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/genenetwork/services/genenetwork.scm b/genenetwork/services/genenetwork.scm
index 6905686..16c5a4f 100644
--- a/genenetwork/services/genenetwork.scm
+++ b/genenetwork/services/genenetwork.scm
@@ -42,6 +42,7 @@
#:use-module (forge socket)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
+ #:use-module (web uri)
#:export (genenetwork-service-type
genenetwork-configuration
genenetwork-configuration?
@@ -99,6 +100,8 @@
(default "/var/genenetwork/genotype-files"))
(sparql-endpoint genenetwork-configuration-sparql-endpoint
(default "http://localhost:8081/sparql"))
+ (sparql-server-name genenetwork-configuration-sparql-server-name
+ (default "sparql.genenetwork.org"))
(gn-sourcecode-directory genenetwork-configuration-gn-sourcecode-directory
(default "/var/empty"))
(gn3-data-directory genenetwork-configuration-gn3-data-directory
@@ -471,7 +474,7 @@ object."
reverse proxies for the genenetwork service described by @var{config},
a @code{<genenetwork-configuration>} record."
(match-record config <genenetwork-configuration>
- (server-name gn-auth-server-name gn2-port gn3-port gn-auth-port gn3-alias-server-port)
+ (server-name gn-auth-server-name gn2-port gn3-port gn-auth-port gn3-alias-server-port sparql-endpoint sparql-server-name)
(list (nginx-server-configuration
(server-name (list server-name))
(locations
@@ -504,6 +507,14 @@ a @code{<genenetwork-configuration>} record."
(uri "/")
(body (list (string-append "proxy_pass http://localhost:"
(number->string gn-auth-port) ";")
+ "proxy_set_header Host $host;"))))))
+ (nginx-server-configuration
+ (server-name (list sparql-server-name))
+ (locations
+ (list (nginx-location-configuration
+ (uri "/")
+ (body (list (string-append "proxy_pass http://localhost:"
+ (number->string (uri-port (string->uri sparql-endpoint))) ";")
"proxy_set_header Host $host;")))))))))
(define (genenetwork-mcron-jobs config)