From 057d846140dcde783766d1fc5068ee6391558fbd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 11 Sep 2017 07:06:29 +0100 Subject: [PATCH] Add nginx config --- config/nginx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 config/nginx diff --git a/config/nginx b/config/nginx new file mode 100644 index 00000000..6aa7d821 --- /dev/null +++ b/config/nginx @@ -0,0 +1,29 @@ +server { + listen 80; + + server_name oliverdavies.uk; + server_name www.oliverdavies.uk; + + return 301 https://www.oliverdavies.uk$uri$is_args$args; +} + +server { + listen 443 ssl; + + server_name oliverdavies.uk; + + return 301 https://www.oliverdavies.uk$uri$is_args$args; +} + +server { + listen 443 ssl; + + server_name www.oliverdavies.uk; + + root /var/www/oliverdavies.uk/output_prod; + + ssl_certificate /etc/letsencrypt/live/oliverdavies.uk/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/oliverdavies.uk/privkey.pem; + + rewrite ^/about/?$ / permanent; +}