Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cd: nginx 설정 파일에 ssl 설정 추가 #823

Merged
merged 2 commits into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
server {
listen 80;
listen 443 ssl;
server_name 42library.kr;

#access_log /var/log/nginx/host.access.log main;

ssl_certificate /etc/letsencrypt/live/42library.kr/fullchain.pem; # managed by Cert>
ssl_certificate_key /etc/letsencrypt/live/42library.kr/privkey.pem; # managed by Ce>

include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

location /api/ {
proxy_pass http://backend:3000;
}
Expand Down Expand Up @@ -42,3 +48,13 @@ server {
root /usr/share/nginx/html;
}
}

server {
if ($host = 42library.kr) {
return 301 https://$host$request_uri;
} # managed by Certbot

listen 80;
server_name 42library.kr;
return 404; # managed by Certbot
}
Loading