From c055d513d648b3fef6af290b04bb9fd5cb2ca39c Mon Sep 17 00:00:00 2001 From: Cliff Johnson Date: Wed, 20 Nov 2024 16:21:03 -0600 Subject: [PATCH] downtime redirect v2 --- sites/www.zooniverse.org.conf | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sites/www.zooniverse.org.conf b/sites/www.zooniverse.org.conf index 6d92d94..9e41690 100644 --- a/sites/www.zooniverse.org.conf +++ b/sites/www.zooniverse.org.conf @@ -95,14 +95,18 @@ server { # include /etc/nginx/proxy-security-headers.conf; # } - # DOWNTIME ENABLED - set $status_uri "https://zooniverse-359.freshstatus.io"; + # DOWNTIME ENABLED V1 + # set $status_uri "https://zooniverse-359.freshstatus.io"; + # location / { + # # Put the URL in a variable to force re-resolution of the DNS name + # # Otherwise nginx will cache it indefinitely and it'll break if IPs change + # resolver 1.1.1.1; + # proxy_pass $status_uri; + # proxy_set_header Host $host; + # proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + # } + # DOWNTIME ENABLED V2 location / { - # Put the URL in a variable to force re-resolution of the DNS name - # Otherwise nginx will cache it indefinitely and it'll break if IPs change - resolver 1.1.1.1; - proxy_pass $status_uri; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + return 301 "https://status.zooniverse.org"; } }