From bdc4383687df0e6f1787f04af2dc64602cd03009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Tue, 23 Jun 2026 17:56:57 +0800 Subject: [PATCH] =?UTF-8?q?D140=20=C2=B7=20=E4=BF=AE=E5=A4=8D=20/ide/=20?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=20=C2=B7=20Nginx=E9=85=8D=E7=BD=AE=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1location=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 问题:主页/ide/卡片点击后跳回首页(Nginx无/ide/ location) - 根因:code-server运行在3920端口,但Nginx配置缺少/ide/反代 - 修复:在nginx-guanghubingshuo.conf添加/ide/ location块 - 反代目标:127.0.0.1:3920(code-server实际监听端口) - 同时清理sites-enabled/下多余的.bak文件(移入/root/nginx-backup/) TCS-VERIFY: TCS-VRF-SOV-D139-8A7F2C --- .../BS-SG-001/nginx-guanghubingshuo.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/brain/operations/BS-SG-001/nginx-guanghubingshuo.conf b/brain/operations/BS-SG-001/nginx-guanghubingshuo.conf index 5e51091..45d9a90 100644 --- a/brain/operations/BS-SG-001/nginx-guanghubingshuo.conf +++ b/brain/operations/BS-SG-001/nginx-guanghubingshuo.conf @@ -172,4 +172,18 @@ server { proxy_cache off; proxy_read_timeout 300s; } + # === D140 新增:代码开发 IDE(code-server on :3920)=== + location /ide/ { + proxy_pass http://127.0.0.1:3920/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + 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_buffering off; + proxy_cache off; + proxy_read_timeout 300s; + } }