From da2572ddb144086034eba1989ae909763e95c680 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 20 Dec 2015 14:13:08 +0100 Subject: Use the Let's Encrypt CA for our public certs. --- roles/wiki/files/etc/nginx/sites-available/website | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'roles/wiki/files/etc/nginx/sites-available/website') diff --git a/roles/wiki/files/etc/nginx/sites-available/website b/roles/wiki/files/etc/nginx/sites-available/website index 3e32158..2519286 100644 --- a/roles/wiki/files/etc/nginx/sites-available/website +++ b/roles/wiki/files/etc/nginx/sites-available/website @@ -5,10 +5,14 @@ server { server_name fripost.org; server_name www.fripost.org; - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log info; + include snippets/acme-challenge.conf; - return 301 https://fripost.org$request_uri; + access_log /var/log/nginx/www.access.log; + error_log /var/log/nginx/www.error.log info; + + location / { + return 301 https://$host$request_uri; + } } @@ -16,14 +20,15 @@ server { listen 443; listen [::]:443; - server_name fripost.org; + server_name fripost.org; + server_name www.fripost.org; include snippets/ssl.conf; ssl_certificate /etc/nginx/ssl/www.fripost.org.chained.pem; ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key; - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log info; + access_log /var/log/nginx/www.access.log; + error_log /var/log/nginx/www.error.log info; location / { try_files $uri $uri/ =404; -- cgit v1.2.3