aboutsummaryrefslogtreecommitdiff
path: root/container.scm
diff options
context:
space:
mode:
Diffstat (limited to 'container.scm')
-rw-r--r--container.scm20
1 files changed, 15 insertions, 5 deletions
diff --git a/container.scm b/container.scm
index 32b403e..df97a46 100644
--- a/container.scm
+++ b/container.scm
@@ -66,10 +66,13 @@
(httpd-directive 'Require 'all 'granted))
(httpd-directive 'WSGIScriptAlias aliased-path wsgi-file))))
-(define (koszko-httpd-server-meta server-name)
- (list (httpd-directive 'ServerName server-name)
- (httpd-directive 'ServerAlias (string-append "www." server-name))
- (httpd-directive 'ServerAdmin "koszko@koszko.org")))
+(define* (koszko-httpd-server-meta server-name #:optional (use-www-alias #t))
+ (let ((basic-dirs (list (httpd-directive 'ServerName server-name)
+ (httpd-directive 'ServerAdmin "koszko@koszko.org"))))
+ (if use-www-alias
+ (cons (httpd-directive 'ServerAlias (string-append "www." server-name))
+ basic-dirs)
+ basic-dirs)))
(define (koszko-httpd-redirect-if-other-host host-name)
(httpd-tag 'If (list (format #f "%{HTTP_HOST} != '~a'" host-name))
@@ -182,6 +185,12 @@
(g-string-append (local-file (string-append %here "/hydrilla-wsgi.py"))
"/$1")))))
+(define %hydrillarepos-virtualhost
+ (httpd-virtualhost
+ "*:80"
+ `(,@(koszko-httpd-server-meta "hydrillarepos.koszko.org" #f)
+ ,(httpd-directive 'DocumentRoot "/srv/http/hydrillarepos.koszko.org"))))
+
(define %wsgi-module
(httpd-module
(name "wsgi_module")
@@ -249,7 +258,8 @@
%hydrillabugs-virtualhost
%hachettebugs-virtualhost
%haketilo-virtualhost
- %hydrilla-virtualhost))
+ %hydrilla-virtualhost
+ %hydrillarepos-virtualhost))
(service
(shepherd-service-type
'dummy-network