Skip to content

Instantly share code, notes, and snippets.

@gswallow
Last active August 29, 2015 14:07
Show Gist options
  • Save gswallow/b96024831f1b32ab2a86 to your computer and use it in GitHub Desktop.
Save gswallow/b96024831f1b32ab2a86 to your computer and use it in GitHub Desktop.
server {
listen 443;
server_name customerold.ourplatform.net;
...
location / {
proxy_set_header Host customer.ourplatform.net;
proxy_pass http://upstream_application;
proxy_redirect http://customer.ourplatform.net https://customerold.ourplatform.net;
}
}
server {
listen 443;
server_name customer.ourplatform.net;
...
location / {
proxy_set_header Host customernew.ourplatform.net;
proxy_pass http://upstream_application;
proxy_redirect http://customernew.ourplatform.net https://customer.ourplatform.net;
}
}
location ~ ^/batches/([^/]+)/customer$ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://quartermaster_application/batches/$1/customernew$is_args$args;
proxy_redirect http:// https://;
proxy_read_timeout 500;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment