refactor: remove /goosefarm subpath from default, add goosefarminvesting.conf (SSOT)
Some checks failed
Deploy Nginx Config to Ubuntu Server / deploy (push) Has been cancelled

- goosefarminvesting.com은 별도 도메인으로 직접 서빙
- ro-being.com/goosefarm/ 경로 제거
- base: / 빌드에 맞춘 nginx 설정
This commit is contained in:
happybell80 2026-03-24 14:54:01 +09:00
parent 9eb7afcdb8
commit 3771ba80de
2 changed files with 46 additions and 78 deletions

View File

@ -69,31 +69,8 @@ server {
try_files $uri /index.html;
}
# GooseFarm API - must come before /goosefarm for priority
location /goosefarm/api/ {
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 8 256k;
proxy_busy_buffers_size 512k;
proxy_read_timeout 120s;
proxy_pass http://localhost:8200/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# GooseFarm index.html 캐시 방지 (Vite 해시 파일명 변경 시 즉시 반영)
location = /goosefarm/index.html {
alias /var/www/html/goosefarm/index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
# GooseFarm Frontend
location /goosefarm {
alias /var/www/html/goosefarm/;
try_files $uri /goosefarm/index.html;
}
# IR Valuation Frontend
location /ir-valuation {
@ -280,31 +257,8 @@ server {
try_files $uri /index.html;
}
# GooseFarm API - must come before /goosefarm for priority
location /goosefarm/api/ {
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 8 256k;
proxy_busy_buffers_size 512k;
proxy_read_timeout 120s;
proxy_pass http://localhost:8200/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# GooseFarm index.html 캐시 방지 (Vite 해시 파일명 변경 시 즉시 반영)
location = /goosefarm/index.html {
alias /var/www/html/goosefarm/index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
# GooseFarm Frontend
location /goosefarm {
alias /var/www/html/goosefarm/;
try_files $uri /goosefarm/index.html;
}
# API endpoints -> route to gateway (host 8100 -> container 8000)
location /api/ {
@ -432,18 +386,13 @@ server {
server {
listen 80;
listen [::]:80;
server_name goosefarminvesting.com www.goosefarminvesting.com;
location /.well-known/acme-challenge/ {
alias /var/www/html/.well-known/acme-challenge/;
}
if ($host = www.goosefarminvesting.com) {
return 301 https://goosefarminvesting.com$request_uri;
}
location = / {
return 301 https://$host/goosefarm/;
}
location / {
@ -454,43 +403,16 @@ server {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name goosefarminvesting.com www.goosefarminvesting.com;
ssl_certificate /etc/letsencrypt/live/goosefarminvesting.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/goosefarminvesting.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
if ($host = www.goosefarminvesting.com) {
return 301 https://goosefarminvesting.com$request_uri;
}
location = / {
return 301 https://$host/goosefarm/;
}
location /goosefarm/api/ {
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 8 256k;
proxy_busy_buffers_size 512k;
proxy_read_timeout 120s;
proxy_pass http://localhost:8200/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /goosefarm/index.html {
alias /var/www/html/goosefarm/index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
location /goosefarm {
alias /var/www/html/goosefarm/;
try_files $uri /goosefarm/index.html;
}
location /.well-known/acme-challenge/ {
alias /var/www/html/.well-known/acme-challenge/;

View File

@ -0,0 +1,46 @@
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name goosefarminvesting.com www.goosefarminvesting.com;
ssl_certificate /etc/letsencrypt/live/goosefarminvesting.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/goosefarminvesting.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
root /var/www/html/goosefarm;
index index.html;
location /api/ {
proxy_pass http://localhost:8200/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 120s;
}
location / {
try_files $uri $uri/ /index.html;
}
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
location /.well-known/acme-challenge/ {
alias /var/www/html/.well-known/acme-challenge/;
}
}
server {
listen 80;
listen [::]:80;
server_name goosefarminvesting.com www.goosefarminvesting.com;
location /.well-known/acme-challenge/ {
alias /var/www/html/.well-known/acme-challenge/;
}
location / {
return 301 https://$host$request_uri;
}
}