From 9aca035f2d6930102f225d81845f2aa99aa8a26e Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Thu, 26 May 2022 23:32:25 -0400 Subject: [PATCH] Redirect HTTP to HTTPS --- roles/proxy/templates/server-nginx.conf.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/proxy/templates/server-nginx.conf.j2 b/roles/proxy/templates/server-nginx.conf.j2 index 718a96e..e612244 100644 --- a/roles/proxy/templates/server-nginx.conf.j2 +++ b/roles/proxy/templates/server-nginx.conf.j2 @@ -1,3 +1,10 @@ +server { + listen 80; + + server_name {{ item.domain }}; + return 301 https://{{ item.domain }}$request_uri; +} + server { listen 443 ssl; server_name {{ item.domain }};