[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: nginx: berlin: Redirect legacy hostnames to curre
From: |
Tobias Geerinckx-Rice |
Subject: |
branch master updated: nginx: berlin: Redirect legacy hostnames to current ones. |
Date: |
Wed, 02 Dec 2020 15:53:48 -0500 |
This is an automated email from the git hooks/post-receive script.
nckx pushed a commit to branch master
in repository maintenance.
The following commit(s) were added to refs/heads/master by this push:
new c85e128 nginx: berlin: Redirect legacy hostnames to current ones.
c85e128 is described below
commit c85e128e11d3ba060ae3a6e01da20f531b42d6ef
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Wed Dec 2 21:43:53 2020 +0100
nginx: berlin: Redirect legacy hostnames to current ones.
* hydra/nginx/berlin.scm (guix.info-locations): Remove variable.
(%berlin-servers): Move all legacy hostnames to their own server
configuration, and redirect to the current name.
---
hydra/nginx/berlin.scm | 137 ++++++++++++++++++++++---------------------------
1 file changed, 60 insertions(+), 77 deletions(-)
diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm
index 20c830e..39a49d9 100644
--- a/hydra/nginx/berlin.scm
+++ b/hydra/nginx/berlin.scm
@@ -745,14 +745,6 @@ PUBLISH-URL."
(uri "/.well-known")
(body (list "root /var/www;")))))
-(define guix.info-locations
- (list (nginx-location-configuration ;certbot
- (uri "~ ^/\\.well-known")
- (body (list "root /var/www;")))
- (nginx-location-configuration
- (uri "~ /(.*)")
- (body (list "return 301 $scheme://guix.gnu.org/$1;")))))
-
(define %publish-url "http://localhost:3000")
(define %berlin-servers
@@ -760,9 +752,7 @@ PUBLISH-URL."
;; Plain HTTP
(nginx-server-configuration
(listen '("80"))
- (server-name '("berlin.guixsd.org"
- "ci.guix.info"
- "ci.guix.gnu.org"))
+ (server-name '("ci.guix.gnu.org"))
(locations (berlin-locations %publish-url))
(raw-content
(list
@@ -789,7 +779,7 @@ PUBLISH-URL."
(list
;; TODO This works around NGinx using the epoch for the
;; Last-Modified date, as well as the etag.
- ;; See http://issues.guix.info/issue/37207
+ ;; See http://issues.guix.gnu.org/37207
"add_header Last-Modified \"\";"
"if_modified_since off;"
"etag off;"
@@ -799,20 +789,7 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("80"))
- (server-name '("guix.info"
- "www.guix.info"))
- (locations guix.info-locations)
- (raw-content
- (append
- %tls-settings
- (list
- "rewrite (.*)/$ $1/index.html;"
- "access_log /var/log/nginx/guix-info.https.access.log;"))))
-
- (nginx-server-configuration
- (listen '("80"))
- (server-name '("issues.guix.info"
- "issues.guix.gnu.org"))
+ (server-name '("issues.guix.gnu.org"))
(root "/home/rekado/mumi/")
(locations
(list (nginx-location-configuration ;certbot
@@ -827,9 +804,7 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("80"))
- (server-name '("workflows.guix.info"
- "workflow.guix.info"
- "guixwl.org"
+ (server-name '("guixwl.org"
"www.guixwl.org"))
(root "/home/rekado/gwl/")
(locations
@@ -852,9 +827,7 @@ PUBLISH-URL."
;; HTTPS servers
(nginx-server-configuration
(listen '("443 ssl"))
- (server-name '("berlin.guixsd.org"
- "ci.guix.info"
- "ci.guix.gnu.org"))
+ (server-name '("ci.guix.gnu.org"))
(ssl-certificate (le "berlin.guixsd.org"))
(ssl-certificate-key (le "berlin.guixsd.org" 'key))
(locations (berlin-locations %publish-url))
@@ -898,20 +871,6 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("443 ssl"))
- (server-name '("guix.info"
- "www.guix.info"))
- (ssl-certificate (le "guix.info"))
- (ssl-certificate-key (le "guix.info" 'key))
- (locations guix.info-locations)
- (raw-content
- (append
- %tls-settings
- (list
- "rewrite (.*)/$ $1/index.html;"
- "access_log /var/log/nginx/guix-info.https.access.log;"))))
-
- (nginx-server-configuration
- (listen '("443 ssl"))
(server-name '("guix.gnu.org"))
(ssl-certificate (le "guix.gnu.org"))
(ssl-certificate-key (le "guix.gnu.org" 'key))
@@ -923,7 +882,7 @@ PUBLISH-URL."
(list
;; TODO This works around NGinx using the epoch for the
;; Last-Modified date, as well as the etag.
- ;; See http://issues.guix.info/issue/37207
+ ;; See http://issues.guix.gnu.org/37207
"add_header Last-Modified \"\";"
"if_modified_since off;"
"etag off;"
@@ -933,32 +892,6 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("443 ssl"))
- (server-name '("issues.guix.info"))
- (ssl-certificate (le "issues.guix.info"))
- (ssl-certificate-key (le "issues.guix.info" 'key))
- (root "/home/rekado/mumi/")
- (locations
- (list (nginx-location-configuration ;certbot
- (uri "/.well-known")
- (body (list "root /var/www;")))
- (nginx-location-configuration
- (uri "/")
- (body '("proxy_pass http://localhost:1234;")))))
- (raw-content
- (append
- %tls-settings
- (list
- "proxy_set_header X-Forwarded-Host $host;"
- "proxy_set_header X-Forwarded-Port $server_port;"
- "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;"
- "proxy_connect_timeout 600;"
- "proxy_send_timeout 600;"
- "proxy_read_timeout 600;"
- "send_timeout 600;"
- "access_log /var/log/nginx/issues-guix-info.https.access.log;"))))
-
- (nginx-server-configuration
- (listen '("443 ssl"))
(server-name '("issues.guix.gnu.org"))
(ssl-certificate (le "issues.guix.gnu.org"))
(ssl-certificate-key (le "issues.guix.gnu.org" 'key))
@@ -982,9 +915,7 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("443 ssl"))
- (server-name '("workflows.guix.info"
- "workflow.guix.info"
- "guixwl.org"
+ (server-name '("guixwl.org"
"www.guixwl.org"))
(ssl-certificate (le "www.guixwl.org"))
(ssl-certificate-key (le "www.guixwl.org" 'key))
@@ -1008,7 +939,59 @@ PUBLISH-URL."
"proxy_send_timeout 600;"
"proxy_read_timeout 600;"
"send_timeout 600;"
- "access_log /var/log/nginx/workflows-guix-info.https.access.log;"))))))
+ "access_log /var/log/nginx/workflows-guix-info.https.access.log;"))))
+
+ ;; Backwards compatibility with legacy hostnames.
+ (nginx-server-configuration
+ (listen '("443 ssl"
+ "80"))
+ (ssl-certificate (le "berlin.guixsd.org"))
+ (ssl-certificate-key (le "berlin.guixsd.org" 'key))
+ (server-name '("berlin.guixsd.org"
+ "ci.guix.info"))
+ (locations
+ (list
+ (nginx-location-configuration
+ (uri "~ /(.*)")
+ (body (list "return 301 $scheme://ci.guix.gnu.org/$1;"))))))
+
+ (nginx-server-configuration
+ (listen '("443 ssl"
+ "80"))
+ (server-name '("guix.info"
+ "www.guix.info"))
+ (ssl-certificate (le "guix.info"))
+ (ssl-certificate-key (le "guix.info" 'key))
+ (locations
+ (list
+ (nginx-location-configuration
+ (uri "~ /(.*)")
+ (body (list "return 301 $scheme://guix.gnu.org/$1;"))))))
+
+ (nginx-server-configuration
+ (listen '("443 ssl"
+ "80"))
+ (server-name '("issues.guix.info"))
+ (ssl-certificate (le "issues.guix.info"))
+ (ssl-certificate-key (le "issues.guix.info" 'key))
+ (locations
+ (list
+ (nginx-location-configuration
+ (uri "~ /(.*)")
+ (body (list "return 301 $scheme://issues.guix.gnu.org/$1;"))))))
+
+ (nginx-server-configuration
+ (listen '("443 ssl"
+ "80"))
+ (server-name '("workflows.guix.info"
+ "workflow.guix.info"))
+ (ssl-certificate (le "www.guixwl.org"))
+ (ssl-certificate-key (le "www.guixwl.org" 'key))
+ (locations
+ (list
+ (nginx-location-configuration
+ (uri "~ /(.*)")
+ (body (list "return 301 $scheme://guixwl.org/$1;"))))))))
(define %extra-content
(list
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: nginx: berlin: Redirect legacy hostnames to current ones.,
Tobias Geerinckx-Rice <=