aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--container.scm35
1 files changed, 15 insertions, 20 deletions
diff --git a/container.scm b/container.scm
index 12858b9..c50a75b 100644
--- a/container.scm
+++ b/container.scm
@@ -11,6 +11,17 @@
(use-service-modules web)
(use-service-modules shepherd)
+(define* (simple-wsgi-alias-gexp package wsgi-path #:key (aliased-path "/"))
+ #~(let* ((wsgi-file (string-append #$package #$wsgi-path)))
+ (format #f
+ "\
+ <Files ~s>
+ Require all granted
+ </Files>
+ WSGIScriptAlias ~a ~a
+ "
+ wsgi-file #$aliased-path wsgi-file)))
+
(define %koszko-org-virtualhost
(httpd-virtualhost
"*:80"
@@ -28,16 +39,8 @@
WSGIScriptReloading On
"
- #~(let* ((script-rel "/share/koszko-org-website/wsgi.py")
- (wsgi-file (string-append #$koszko-org-website script-rel)))
- (format #f
- "\
- <Files ~s>
- Require all granted
- </Files>
- WSGIScriptAlias / ~a
- "
- wsgi-file wsgi-file)))))
+ (simple-wsgi-alias-gexp koszko-org-website
+ "/share/koszko-org-website/wsgi.py"))))
(define %koszkonutek-tmp-virtualhost
(httpd-virtualhost
@@ -96,16 +99,8 @@
WSGIScriptReloading On
"
- #~(let* ((script-rel "/share/hydrilla-website/wsgi.py")
- (wsgi-file (string-append #$hydrilla-website script-rel)))
- (format #f
- "\
- <Files ~s>
- Require all granted
- </Files>
- WSGIScriptAlias / ~a
- "
- wsgi-file wsgi-file)))))
+ (simple-wsgi-alias-gexp hydrilla-website
+ "/share/hydrilla-website/wsgi.py"))))
(define %wsgi-module
(httpd-module