Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable full site downtime #382

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions sites/www.zooniverse.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ server {
set $fe_project_host "fe-project.zooniverse.org";

include /etc/nginx/ssl.default.conf;
include /etc/nginx/project-redirects.conf;
include /etc/nginx/pfe-redirects.conf;

# DOWNTIME, let the / below catch everything
# include /etc/nginx/project-redirects.conf;
# include /etc/nginx/pfe-redirects.conf;

server_name www.zooniverse.org;

Expand Down Expand Up @@ -84,11 +86,23 @@ server {
}

# Default to fe-root app
# SITE DISABLED
# location / {
# resolver 1.1.1.1;
# proxy_pass "https://fe-root.zooniverse.org";
# proxy_set_header Host fe-root.zooniverse.org;

# include /etc/nginx/proxy-security-headers.conf;
# }

# DOWNTIME ENABLED
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 "https://fe-root.zooniverse.org";
proxy_set_header Host fe-root.zooniverse.org;

include /etc/nginx/proxy-security-headers.conf;
proxy_pass $status_uri;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
}
}