From 70545fd17aa2026a5daa212f174ce18c2816ba7c Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Mon, 26 Sep 2022 18:30:04 -0400 Subject: tls --- cyfraeviolae-tls.conf | 4 ++++ cyfraeviolae.conf | 12 ++---------- 2 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 cyfraeviolae-tls.conf diff --git a/cyfraeviolae-tls.conf b/cyfraeviolae-tls.conf new file mode 100644 index 0000000..45bda9e --- /dev/null +++ b/cyfraeviolae-tls.conf @@ -0,0 +1,4 @@ +ssl_certificate /etc/letsencrypt/live/cyfraeviolae.org/fullchain.pem; +ssl_certificate_key /etc/letsencrypt/live/cyfraeviolae.org/privkey.pem; +include /etc/letsencrypt/options-ssl-nginx.conf; +ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; diff --git a/cyfraeviolae.conf b/cyfraeviolae.conf index 7356b2d..0b55f97 100644 --- a/cyfraeviolae.conf +++ b/cyfraeviolae.conf @@ -1,10 +1,8 @@ server { + listen 80 default_server; listen 443 ssl default_server; - ssl_certificate /etc/letsencrypt/live/cyfraeviolae.org/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/cyfraeviolae.org/privkey.pem; - include /etc/letsencrypt/options-ssl-nginx.conf; - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + include /etc/nginx/conf.d/cyfraeviolae-ssl.conf*; location /forbidden-salamanders { proxy_pass http://127.0.0.1:9010/; @@ -61,9 +59,3 @@ server { add_header Cache-Control "public"; } } - -server { - listen 80 default_server; - - return 301 https://$host$request_uri; -} -- cgit v1.2.3