[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: nginx: berlin: "guix.info" redirects to "guix.gnu.org".
From: |
Ludovic Courtès |
Subject: |
03/03: nginx: berlin: "guix.info" redirects to "guix.gnu.org". |
Date: |
Wed, 17 Jul 2019 16:32:06 -0400 (EDT) |
civodul pushed a commit to branch master
in repository maintenance.
commit 3c49eb722993ed6f041b549b7d24b1dd33a19988
Author: Ludovic Courtès <address@hidden>
Date: Wed Jul 17 22:30:32 2019 +0200
nginx: berlin: "guix.info" redirects to "guix.gnu.org".
* hydra/nginx/berlin.scm (guix.info-locations): New variable.
(%berlin-servers): Remove "guix.info" and "www.guix.info" from the
"guix.gnu.org" server block, and add a separate block for it.
---
hydra/nginx/berlin.scm | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm
index 45eefc2..80e388b 100644
--- a/hydra/nginx/berlin.scm
+++ b/hydra/nginx/berlin.scm
@@ -443,6 +443,14 @@ 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
@@ -472,9 +480,7 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("80"))
- (server-name '("guix.info"
- "www.guix.info"
- "guix.gnu.org"))
+ (server-name '("guix.gnu.org"))
(root "/srv/guix.gnu.org")
(locations guix.gnu.org-locations)
(raw-content
@@ -483,6 +489,17 @@ PUBLISH-URL."
(nginx-server-configuration
(listen '("80"))
+ (server-name '("guix.info"
+ "www.guix.info"))
+ (locations guix.info-locations)
+ (raw-content
+ (append
+ %tls-settings
+ (list
+ "access_log /var/log/nginx/guix-info.https.access.log;"))))
+
+ (nginx-server-configuration
+ (listen '("80"))
(server-name '("issues.guix.info"
"issues.guix.gnu.org"))
(root "/home/rekado/mumi/")
@@ -554,7 +571,7 @@ PUBLISH-URL."
"www.guix.info"))
(ssl-certificate (le "guix.info"))
(ssl-certificate-key (le "guix.info" 'key))
- (root "/home/rekado/guix.info")
+ (locations guix.info-locations)
(raw-content
(append
%tls-settings