docker: nginx listens on 80 and 8890, backend moves to internal 8891
Deploy platforms that route to the container's exposed/compose port (8890) were hitting the fun backend directly, which 404s unmatched GET paths. Now nginx answers on both ports so either routing lands on the SPA/API proxy layer. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
+6
-5
@@ -1,5 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 8890;
|
||||
server_name _;
|
||||
root /app/web/dist;
|
||||
index index.html;
|
||||
@@ -9,7 +10,7 @@ server {
|
||||
# 前端 RPC 约定走 /api 前缀,反代时剥掉(与 vite dev proxy 行为一致)
|
||||
# /cell 同时承载 fun.Stream 的 NDJSON 长连接,必须关缓冲
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8890/;
|
||||
proxy_pass http://127.0.0.1:8891/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -31,7 +32,7 @@ server {
|
||||
# /dbm/* 数据库导入导出
|
||||
# *.php Epay 兼容支付端点
|
||||
location ~ ^/(cell|mcp|healthz|m)$ {
|
||||
proxy_pass http://127.0.0.1:8890;
|
||||
proxy_pass http://127.0.0.1:8891;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -41,7 +42,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(m|d|v1|files|disk|dbm)/ {
|
||||
proxy_pass http://127.0.0.1:8890;
|
||||
proxy_pass http://127.0.0.1:8891;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -50,7 +51,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/ws/ {
|
||||
proxy_pass http://127.0.0.1:8890;
|
||||
proxy_pass http://127.0.0.1:8891;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -62,7 +63,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/(submit|mapi|api)\.php$ {
|
||||
proxy_pass http://127.0.0.1:8890;
|
||||
proxy_pass http://127.0.0.1:8891;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user