From b046c72036463483b349ac7a88c31d6957407274 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Mon, 25 Apr 2016 23:06:14 +0200 Subject: [PATCH] Add SSL config for htwtxt server. --- systemfiles/nginx.conf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/systemfiles/nginx.conf b/systemfiles/nginx.conf index 601b67b..0c1efe3 100644 --- a/systemfiles/nginx.conf +++ b/systemfiles/nginx.conf @@ -23,7 +23,13 @@ http { access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; - # IRC logs server + # enforce https + server { + listen 80; + return 301 https://$host$request_uri; + } + + # IRC logs server { listen 443 ssl; server_name dump.plomlompom.com; @@ -44,7 +50,10 @@ http { # htwtxt server { + listen 443 ssl; server_name htwtxt.plomlompom.com; + ssl_certificate /etc/letsencrypt/live/htwtxt.plomlompom.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/htwtxt.plomlompom.com/privkey.pem; location / { proxy_pass http://127.0.0.1:8000; } -- 2.30.2