aboutsummaryrefslogtreecommitdiff
path: root/container.scm
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-11-23 11:21:33 +0100
committerWojtek Kosior <koszko@koszko.org>2022-11-23 11:21:33 +0100
commit0ef35f69a5c5aa12d45c855ce6ea66f07efa99d5 (patch)
tree6967ec83989e35c075dd9bbbc4fe088f317a2da4 /container.scm
parentb3e66d97993318e91c0ff634fec62978f6530785 (diff)
downloadkoszko-org-server-0ef35f69a5c5aa12d45c855ce6ea66f07efa99d5.tar.gz
koszko-org-server-0ef35f69a5c5aa12d45c855ce6ea66f07efa99d5.zip
add haketilo.koszko.org virtualhost
Diffstat (limited to 'container.scm')
-rw-r--r--container.scm38
1 files changed, 36 insertions, 2 deletions
diff --git a/container.scm b/container.scm
index 584914d..12858b9 100644
--- a/container.scm
+++ b/container.scm
@@ -6,6 +6,7 @@
(use-modules (gnu))
(use-modules (koszko-org-website))
+(use-modules (hydrilla-website))
(use-package-modules web)
(use-service-modules web)
(use-service-modules shepherd)
@@ -81,6 +82,31 @@
Redirect permanent / http://hydrillabugs.org/
")))
+(define %haketilo-virtualhost
+ (httpd-virtualhost
+ "*:80"
+ (list "\
+ ServerName haketilo.koszko.org
+ ServerAlias www.haketilo.koszko.org
+ ServerAdmin koszko@koszko.org
+
+ <If \"%{HTTP_HOST} != 'haketilo.koszko.org'\">
+ Redirect permanent / http://haketilo.koszko.org/
+ </If>
+
+ 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)))))
+
(define %wsgi-module
(httpd-module
(name "wsgi_module")
@@ -124,7 +150,14 @@
(operating-system
(host-name "koszko")
(timezone "Europe/Warsaw")
-
+ (groups (cons* (user-group
+ ;; The `httpd` group must have an explicit id so that the host
+ ;; can provide files that are readable by Apache and not
+ ;; readable by the world.
+ (name "httpd")
+ (id 133)
+ (system? #t))
+ %base-groups))
(file-systems (cons (file-system
(device (file-system-label "does-not-matter"))
(mount-point "/")
@@ -139,7 +172,8 @@
(list %koszko-org-virtualhost
%koszkonutek-tmp-virtualhost
%hydrillabugs-virtualhost
- %hachettebugs-virtualhost))
+ %hachettebugs-virtualhost
+ %haketilo-virtualhost))
(service
(shepherd-service-type
'dummy-network