From: Christian Heller Date: Mon, 25 Apr 2016 21:06:14 +0000 (+0200) Subject: Add SSL config for htwtxt server. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/%7B%7Byoutube_prefix%7D%7D%7B%7Bresult.id%7D%7D?a=commitdiff_plain;h=b046c72036463483b349ac7a88c31d6957407274;p=config Add SSL config for htwtxt server. --- 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; }