admin: proc proxy_pass use literal 127.0.0.1:3004 (fix nginx var+URI 404)

Made-with: Cursor
This commit is contained in:
2026-04-26 21:27:50 +08:00
parent 9ab2ae4753
commit 3e78513ea3
2 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -33,7 +33,6 @@ server {
set $tmp_file_dir "/file_upload"; # 文件存储路径
set $task_server "http://127.0.0.1:8080"; # Java task_server
set $huiwing_htyts_rust "127.0.0.1:3003";
set $huiwing_htyproc_rust "127.0.0.1:3004";
set $htyuc "http://127.0.0.1:3000"; #htyuc host
set $resty_loc "/usr/local/openresty";
set $convert "/usr/bin/convert";
@@ -137,8 +136,9 @@ server {
}
# 管理端历史路径 /api/v1/proc/*(与 /api/v2/proc/ 同 upstream Rust htyproc
# 勿在 proxy_pass 的 host 段使用变量 + URI 路径组合,否则 nginx 可能不把 URI 正确传给 axum(对端 404)。
location /api/v1/proc/ {
proxy_pass http://$huiwing_htyproc_rust/api/v1/proc/;
proxy_pass http://127.0.0.1:3004/api/v1/proc/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -155,7 +155,7 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/v2/proc/ {
proxy_pass http://$huiwing_htyproc_rust/api/v1/proc/;
proxy_pass http://127.0.0.1:3004/api/v1/proc/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;