From 6933019eb860fa2e7141c1a9074f3bbf0770f987 Mon Sep 17 00:00:00 2001 From: Dana Lambert Date: Mon, 13 Dec 2021 10:00:07 +1300 Subject: [PATCH] Redirect http traffic to https --- nginx.production.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nginx.production.conf b/nginx.production.conf index 7c831f1..ec318a2 100644 --- a/nginx.production.conf +++ b/nginx.production.conf @@ -1,6 +1,10 @@ http { server { - listen 80; + listen 80 default_server; + server_name _; + return 301 https://$host$request_uri; + } + server { listen 443 ssl; index index.html; include /etc/nginx/mime.types;