From f5de7a4f98bafb42a58bb6c62e7235b42c7c0c05 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 22 Nov 2022 20:37:36 +0100 Subject: add koszkonutek-tmp.pl.eu.org and {hachette,hydrilla}bugs.koszko.org virtualhosts --- container.scm | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) (limited to 'container.scm') diff --git a/container.scm b/container.scm index 628e2b3..f8a4113 100644 --- a/container.scm +++ b/container.scm @@ -38,11 +38,62 @@ " wsgi-file wsgi-file))))) +(define %koszkonutek-tmp-virtualhost + (httpd-virtualhost + "*:80" + '("\ + ServerName koszkonutek-tmp.pl.eu.org + ServerAlias www.koszkonutek-tmp.pl.eu.org + + Redirect permanent / http://koszko.org/ + "))) + +(define %hydrillabugs-virtualhost + (httpd-virtualhost + "*:80" + '("\ + ServerName hydrillabugs.koszko.org + ServerAlias www.hydrillabugs.koszko.org + ServerAdmin koszko@koszko.org + + + Redirect permanent /projects/hachette /projects/haketilo + + # I don't remember why I added the following line so I'm keeping it just + # in case. + RequestHeader unset Accept-Encoding + + + ProxyPass /projects/haketilo http://10.207.87.1:21011/projects/hachette + ProxyPassReverse /projects/haketilo http://10.207.87.1:21011/projects/hachette + + ProxyPass / http://10.207.87.1:21011/ + ProxyPassReverse / http://10.207.87.1:21011/ + "))) + +(define %hachettebugs-virtualhost + (httpd-virtualhost + "*:80" + '("\ + ServerName hachettebugs.koszko.org + ServerAlias www.hachettebugs.koszko.org + + Redirect permanent / http://hydrillabugs.org/ + "))) + (define %wsgi-module (httpd-module (name "wsgi_module") (file (file-append mod-wsgi "/modules/mod_wsgi.so")))) +(define %proxy-http-modules + (list (httpd-module + (name "proxy_module") + (file (file-append httpd "/modules/mod_proxy.so"))) + (httpd-module + (name "proxy_http_module") + (file (file-append httpd "/modules/mod_proxy_http.so"))))) + ;; logio is needed for the '%O' log format directive (define %logio-module (httpd-module @@ -60,7 +111,10 @@ (httpd-config-file (server-name "koszko.org") (error-log "/var/log/httpd/error.log") - (modules (cons* %wsgi-module %logio-module %default-httpd-modules)) + (modules `(,%wsgi-module + ,@%proxy-http-modules + ,%logio-module + ,@%default-httpd-modules)) (extra-config (list (string-join `("LogFormat" ,%logformat-combined "combined")) "\n" @@ -83,7 +137,10 @@ (services (cons* %koszko-httpd-service (simple-service 'koszko-org-website httpd-service-type - (list %koszko-org-virtualhost)) + (list %koszko-org-virtualhost + %koszkonutek-tmp-virtualhost + %hydrillabugs-virtualhost + %hachettebugs-virtualhost)) (service (shepherd-service-type 'dummy-network -- cgit v1.2.3