yarn workspace gameserver nest start --watch
server {
listen 443 ssl; # HTTPS 요청
server_name your-domain.com;
# SSL 인증서 경로
ssl_certificate /path/to/your/fullchain.pem;
ssl_certificate_key /path/to/your/privkey.pem;
location / {
proxy_pass <http://localhost:3000>;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location /socket.io/ {
proxy_pass <http://localhost:3000>;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
# HTTP 요청을 HTTPS로 리다이렉트
server {
listen 80;
server_name your-domain.com;
return 301 https://$host$request_uri;
}