fix: 更新 demo-proxy.conf 以符合正式環境配置並優化 SSL 轉發
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Has been cancelled
Some checks failed
ERP-Deploy-Demo / deploy-demo (push) Has been cancelled
This commit is contained in:
@@ -1,29 +1,22 @@
|
|||||||
# 總後台 (landlord) - 端口 8080
|
# 正式環境 (Production) - 端口 80
|
||||||
server {
|
# 外部 SSL 終止後(如 Cloudflare/NPM)轉發至此端口
|
||||||
listen 8080;
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
location / {
|
# 定義 map 以正確處理 X-Forwarded-Proto
|
||||||
proxy_pass http://star-erp-laravel:8080;
|
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
||||||
proxy_set_header Host star-erp.demo;
|
default $http_x_forwarded_proto;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
'' $scheme;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# koori 租戶 - 端口 8081
|
|
||||||
server {
|
server {
|
||||||
listen 8081;
|
listen 80;
|
||||||
server_name _;
|
server_name demo-erp.taiwan-star.com.tw;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://star-erp-laravel:8080;
|
proxy_pass http://star-erp-laravel:8080;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user