From 7e32b0f7505d6b40ecc3c505f42275156da8c9bb Mon Sep 17 00:00:00 2001 From: hseong3243 Date: Wed, 17 Jan 2024 23:06:22 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20nginx=20ssl=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/data/nginx/backend.conf | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/data/nginx/backend.conf b/scripts/data/nginx/backend.conf index a52a43d..16b2a1d 100644 --- a/scripts/data/nginx/backend.conf +++ b/scripts/data/nginx/backend.conf @@ -1,12 +1,27 @@ server { listen 80; server_name shoutlink.me; - access_log logs/backend/access.log main; - root /usr/share/nginx/html; - location /api { - proxy_pass http://backend; + location / { + return 301 https://$server_name$request_uri; } + +# location /.well-known/acme-challenge/ { +# root /var/www/certbot; +# } +} + +server { + listen 443 ssl; + server_name shoutlink.me; + + location / { + proxy_pass http://backend; + } + + ssl_certificate /etc/letsencrypt/live/shoutlink.me/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/shoutlink.me/privkey.pem; + ssl_prefer_server_ciphers on; } upstream backend {