From 3d59f490ad5e2820798e85f38bea874693fa686d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 2 Jan 2018 23:01:43 +0000 Subject: [PATCH] Fix with Cloudflare --- ansible/hosts | 2 ++ ansible/provision.yml | 16 ---------------- 2 files changed, 2 insertions(+), 16 deletions(-) create mode 100644 ansible/hosts diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 00000000..ac988c21 --- /dev/null +++ b/ansible/hosts @@ -0,0 +1,2 @@ +[web] +178.62.3.102 diff --git a/ansible/provision.yml b/ansible/provision.yml index f0569fe4..a80f5699 100644 --- a/ansible/provision.yml +++ b/ansible/provision.yml @@ -8,28 +8,12 @@ vars: nginx_vhosts: - listen: 80 - server_name: "oliverdavies.uk {{ server_name }}" - return: "301 https://{{ server_name }}$request_uri" - filename: oliverdavies.uk.80.conf - - - listen: 443 ssl - server_name: oliverdavies.uk - return: "301 https://{{ server_name }}$request_uri" - extra_parameters: | - ssl_certificate /etc/letsencrypt/live/oliverdavies.uk/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/oliverdavies.uk/privkey.pem; - filename: oliverdavies.uk.443.conf - - - listen: 443 ssl server_name: "{{ server_name }}" root: "/srv/{{ server_name }}/current/output_prod" nginx_error_log: "/var/log/nginx/{{ server_name }}_error.log warn" nginx_access_log: "/var/log/nginx/{{ server_name }}_access.log warn" error_page: 404 /404.html extra_parameters: | - ssl_certificate /etc/letsencrypt/live/oliverdavies.uk/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/oliverdavies.uk/privkey.pem; - rewrite ^/(services|work)/?$ /experience permanent; rewrite "^/about/?$" / permanent; rewrite "^/blog/10-useful-drupal-6-modules/?$" /blog/2010/06/25/10-useful-drupal-6-modules permanent;