Compare commits

..

3 Commits

Author SHA1 Message Date
8e3d951d0d feat: 為 demo 環境增加 80 埠口對應
Some checks failed
ERP-Deploy-Production / deploy-production (push) Successful in 57s
ERP-Deploy-Demo / deploy-demo (push) Failing after 51s
2026-02-23 17:12:43 +08:00
d04e5bbffb docs: 修正 demo-proxy.conf 中的環境註解文字
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Failing after 26s
2026-02-23 17:12:20 +08:00
27273bfee4 fix: 更新 demo-proxy.conf 以符合正式環境配置並優化 SSL 轉發
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Has been cancelled
2026-02-23 17:11:58 +08:00
2 changed files with 11 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
services:
proxy:
ports:
- '80:80'
- '8080:8080'
volumes:
- './nginx/demo-proxy.conf:/etc/nginx/conf.d/default.conf:ro'

View File

@@ -1,29 +1,22 @@
# 總後台 (landlord) - 端口 8080
server {
listen 8080;
server_name _;
# Demo 環境 (Demo) - 端口 80
# 外部 SSL 終止後(如 Cloudflare/NPM轉發至此端口
location / {
proxy_pass http://star-erp-laravel:8080;
proxy_set_header Host star-erp.demo;
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_set_header X-Forwarded-Host $host:$server_port;
}
# 定義 map 以正確處理 X-Forwarded-Proto
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
# koori 租戶 - 端口 8081
server {
listen 8081;
server_name _;
listen 80;
server_name demo-erp.taiwan-star.com.tw;
location / {
proxy_pass http://star-erp-laravel:8080;
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_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Host $host;
}
}