diff --git a/conf/huiwings/admin.conf b/conf/huiwings/admin.conf index 414f3b2..ce37541 100644 --- a/conf/huiwings/admin.conf +++ b/conf/huiwings/admin.conf @@ -12,7 +12,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"; # huiwing 仓库 htyts(Rust) - set $huiwing_htyproc_rust "127.0.0.1:3004"; # huiwing 仓库 htyproc(Rust) set $htyuc "http://127.0.0.1:3000"; #htyuc host set $resty_loc "/usr/local/openresty"; set $convert "/usr/bin/convert"; @@ -113,7 +112,7 @@ server { } 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; @@ -129,7 +128,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; diff --git a/conf/moicen/admin.conf b/conf/moicen/admin.conf index 60322a8..f5312cd 100644 --- a/conf/moicen/admin.conf +++ b/conf/moicen/admin.conf @@ -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;