diff --git a/deploy/nginx.conf b/deploy/nginx.conf index 909147147..217b522a1 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -1,7 +1,12 @@ server { - listen 80; + 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;