해결된 질문
작성
·
176
답변 4
1
0
0
letsencrypt로 프론트 도메인과 백 도메인에 https 인증서를 받고,
nginx에는 아래와 같이 저장했는데 sessionid가 생성이 안되네요..
Route53에는 프론트, 백 도메인 각각에 같은 IP를 할당했는데 이렇게 하는 게 맞나요?
사이트 주소는 nodebird.ml 입니다.
server {
server_name nodebird.ml;
location / {
proxy_set_header HOST $host;
proxy_pass http://127.0.0.1:3000;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/nodebird.ml/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/nodebird.ml/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
server_name api.nodebird.ml;
location / {
proxy_set_header HOST $host;
proxy_pass http://127.0.0.1:3010;
proxy_redirect off;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/nodebird.ml/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/nodebird.ml/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = nodebird.ml) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name nodebird.ml;
listen 80;
return 404; # managed by Certbot
}
server {
if ($host = api.nodebird.ml) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name api.nodebird.ml;
listen 80;
return 404; # managed by Certbot
}
0