From 50ae96c4a5c99930cdbe8e35161f10e1dbbdabb7 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 22 May 2020 01:33:26 +0100 Subject: [PATCH] Split nginx vhosts, re-add default_server --- tools/ansible/vars/provision_vars.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/ansible/vars/provision_vars.yml b/tools/ansible/vars/provision_vars.yml index 973c84c..22682a9 100644 --- a/tools/ansible/vars/provision_vars.yml +++ b/tools/ansible/vars/provision_vars.yml @@ -41,7 +41,14 @@ nginx_vhosts: filename: www.oliverdavies.uk.80.conf - listen: 443 ssl - server_name_redirect: oliverdavies.uk + server_name: oliverdavies.uk + return: 301 https://www.oliverdavies.uk$request_uri + filename: oliverdavies.uk.443.conf + extra_parameters: | + ssl_certificate /etc/letsencrypt/live/oliverdavies.uk/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/oliverdavies.uk/privkey.pem; + + - listen: 443 ssl default_server server_name: www.oliverdavies.uk root: '{{ project_root_path }}/{{ ansistrano_current_dir }}/{{ project_web_dir }}' index: index.php