diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-11-22 20:37:36 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-11-22 21:14:59 +0100 |
commit | f5de7a4f98bafb42a58bb6c62e7235b42c7c0c05 (patch) | |
tree | 7c61eebd5dbbb6363678d3ddfd4e3489f81fbe26 | |
parent | e9481847bfbafd7a5541e7c6b649e0fd95a5dbf1 (diff) | |
download | koszko-org-server-f5de7a4f98bafb42a58bb6c62e7235b42c7c0c05.tar.gz koszko-org-server-f5de7a4f98bafb42a58bb6c62e7235b42c7c0c05.zip |
add koszkonutek-tmp.pl.eu.org and {hachette,hydrilla}bugs.koszko.org virtualhosts
-rw-r--r-- | container.scm | 61 | ||||
-rw-r--r-- | hosts-extra | 4 |
2 files changed, 63 insertions, 2 deletions
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 + + <Proxy *> + 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 + </Proxy> + + 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 diff --git a/hosts-extra b/hosts-extra index dd16317..c4c3d1a 100644 --- a/hosts-extra +++ b/hosts-extra @@ -8,3 +8,7 @@ 10.207.87.2 www.koszko.org 10.207.87.2 koszkonutek-tmp.pl.eu.org 10.207.87.2 www.koszkonutek-tmp.pl.eu.org +10.207.87.2 hachettebugs.koszko.org +10.207.87.2 www.hachettebugs.koszko.org +10.207.87.2 hydrillabugs.koszko.org +10.207.87.2 www.hydrillabugs.koszko.org |