From 109bda3a6a595e223e9f4d6ce86734c81924c14d Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 31 Aug 2018 13:58:34 -0400 Subject: [PATCH] Add nginx configuration to serve our older SSL certificate from v1.quay.io and v1-staging.quay.io This will allow us to upgrade our cluster to the new SSL certificate, while still serving the older one for older clients --- conf/nginx/nginx.conf.jnj | 30 ++++++++++++++++++++++++++++-- conf/nginx/server-base.conf.jnj | 2 -- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/conf/nginx/nginx.conf.jnj b/conf/nginx/nginx.conf.jnj index 2b2275d1f..b2998ba33 100644 --- a/conf/nginx/nginx.conf.jnj +++ b/conf/nginx/nginx.conf.jnj @@ -13,8 +13,6 @@ http { vhost_traffic_status_zone; - ssl_certificate ../stack/ssl.cert; - ssl_certificate_key ../stack/ssl.key; ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_session_cache shared:SSL:60m; @@ -29,6 +27,11 @@ http { #ssl_trusted_certificate ../stack/ssl.key; server { + server_name _; + + ssl_certificate ../stack/ssl.cert; + ssl_certificate_key ../stack/ssl.key; + include server-base.conf; listen 443 ssl http2 default; @@ -44,6 +47,29 @@ http { server { include server-base.conf; + server_name v1-staging.quay.io v1.quay.io; + + ssl_certificate ../stack/ssl.old.cert; + ssl_certificate_key ../stack/ssl.old.key; + + listen 443 ssl; + + ssl on; + + # This header must be set only for HTTPS + add_header Strict-Transport-Security "max-age=63072000; preload"; + + access_log /dev/stdout lb_logs; + } + + server { + server_name _; + + ssl_certificate ../stack/ssl.cert; + ssl_certificate_key ../stack/ssl.key; + + include server-base.conf; + listen 8443 ssl http2 default proxy_protocol; ssl on; diff --git a/conf/nginx/server-base.conf.jnj b/conf/nginx/server-base.conf.jnj index 9f7d808ae..5a14ba8d8 100644 --- a/conf/nginx/server-base.conf.jnj +++ b/conf/nginx/server-base.conf.jnj @@ -1,7 +1,5 @@ # vim: ft=nginx -server_name _; - keepalive_timeout 5; if ($host = "www.quay.io") {