From 55d75ba40d5a5656dbe0472507ca2b766af2c929 Mon Sep 17 00:00:00 2001 From: Doug Warren Date: Wed, 23 Jan 2019 01:52:43 +0000 Subject: [PATCH 1/3] Redirect to port 443 when connecting to port 80 in the default docker connection --- deploy/nginx.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy/nginx.conf b/deploy/nginx.conf index f590ec6cd..3c9de5efb 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -1,5 +1,10 @@ server { - listen 80; + listen 80; + server_name localhost; + return 301 https://localhost$request_uri; +} + +server { listen 443 ssl; server_name localhost; From bb0a6c39fd30976c1fd470ee718cbe254f04307e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82aszczyk?= Date: Mon, 28 Jan 2019 12:51:56 +0100 Subject: [PATCH 2/3] Update nginx.conf Implement suggestions --- deploy/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/nginx.conf b/deploy/nginx.conf index 3c9de5efb..70e4deb3b 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -1,7 +1,7 @@ server { listen 80; server_name localhost; - return 301 https://localhost$request_uri; + return 301 https://$host$request_uri; } server { From 384649e0578d0064d2d989b2b950e6ead198e32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82aszczyk?= Date: Mon, 28 Jan 2019 12:57:20 +0100 Subject: [PATCH 3/3] Update nginx.conf Implement suggestions --- deploy/nginx.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/nginx.conf b/deploy/nginx.conf index 70e4deb3b..28dbc42d7 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -1,12 +1,12 @@ server { - listen 80; - server_name localhost; + listen 80 default_server; + server_name _; return 301 https://$host$request_uri; } server { listen 443 ssl; - server_name localhost; + server_name _; ssl_certificate /etc/nginx/snakeoil.crt; ssl_certificate_key /etc/nginx/snakeoil.key;