diff --git a/backend.conf.j2 b/backend.conf.j2 index 53cbb8d..d159ae8 100644 --- a/backend.conf.j2 +++ b/backend.conf.j2 @@ -1,16 +1,18 @@ server { - listen 80; - server_name localhost *.{{ domain }}; + server_name www.{{ domain }}; + return 301 $scheme://{{ domain }}$request_uri; +} +server { + server_name {{ domain }} localhost; return 301 https://$server_name$request_uri; } - server { listen [::]:443 ssl; listen 443 ssl; - server_name localhost *.{{ domain }}; + server_name {{ domain }} localhost; charset utf-8;