Skip to content

Commit

Permalink
chore: nginx https를 위한 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hseong3243 committed Jan 16, 2024
1 parent 9e1f6e8 commit a1167b0
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions scripts/data/nginx/backend.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
server {
listen 80;
server_name shoutlink.me;
access_log logs/backend/access.log main;
root /usr/share/nginx/html;
server_tokens off;

location / {
return 301 https://$server_name$request_uri;
}
}

server {
listen 443 ssl;
server_name shoutlink.me;
access_log logs/backend/access.log main;
server_tokens off;

ssl_certificate /etc/letsencrypt/live/shoutlink/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/shoutlink/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

location /api {
location / {
proxy_pass http://backend;
}
}
Expand Down

0 comments on commit a1167b0

Please sign in to comment.