Files
star-erp/nginx/prod-proxy.conf

23 lines
687 B
Plaintext
Raw Normal View History

2026-01-21 13:34:10 +08:00
# 正式環境 (Production) - 端口 80
# 外部 SSL 終止後(如 Cloudflare/NPM轉發至此端口
# 定義 map 以正確處理 X-Forwarded-Proto
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
2026-01-21 13:34:10 +08:00
server {
listen 80;
server_name erp.koori.tw erp.mamaiclub.com;
2026-01-21 13:34:10 +08:00
location / {
proxy_pass http://star-erp-laravel:80;
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 $proxy_x_forwarded_proto;
2026-01-21 13:34:10 +08:00
proxy_set_header X-Forwarded-Host $host;
}
}