40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name YOUR_DOMAIN_OR_IP; # 예: bizvibe.ktenterprise.net
|
|
|
|
# 1. 프론트엔드 (React 빌드 결과물)
|
|
# 'npm run build'로 생성된 dist 폴더 경로를 지정하세요.
|
|
location / {
|
|
root /home/ubuntu/projects/bizvibe/dist; # [수정 필요] 실제 프로젝트 경로로 변경
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# 2. 백엔드 API 프록시
|
|
# Node.js 서버(포트 3001)로 요청을 전달합니다.
|
|
location /api {
|
|
proxy_pass http://127.0.0.1:3001;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_cache_bypass $http_upgrade;
|
|
}
|
|
|
|
# 3. 영상 생성 및 다운로드 프록시
|
|
location /render {
|
|
proxy_pass http://127.0.0.1:3001;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location /downloads {
|
|
proxy_pass http://127.0.0.1:3001;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location /temp {
|
|
proxy_pass http://127.0.0.1:3001;
|
|
proxy_set_header Host $host;
|
|
}
|
|
}
|