admin: proc proxy_pass use literal 127.0.0.1:3004 (fix nginx var+URI 404)
Made-with: Cursor
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user