From 8c583acfcc3962886c5f4e1eda1aa1a51c6f99ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Sun, 26 Apr 2026 22:30:18 +0800 Subject: [PATCH] fix: hardcode upstream address in proxy_pass to avoid nginx variable URI rewrite issue --- conf/moicen/proc.conf | 4 +--- conf/moicen/ts.conf | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/conf/moicen/proc.conf b/conf/moicen/proc.conf index b59a0ba..f8cf396 100644 --- a/conf/moicen/proc.conf +++ b/conf/moicen/proc.conf @@ -8,8 +8,6 @@ server { ssl_certificate /etc/letsencrypt/live/moicen.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/moicen.com/privkey.pem; # managed by Certbot - set $huiwing_htyproc_rust "127.0.0.1:3004"; # huiwing 仓库 htyproc(Rust) - location /api/v2/proc/ { add_header Access-Control-Allow-Origin $http_origin always; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS' always; @@ -19,6 +17,6 @@ server { if ($request_method = 'OPTIONS') { return 200; } - proxy_pass http://$huiwing_htyproc_rust/api/v1/proc/; + proxy_pass http://127.0.0.1:3004/api/v1/proc/; } } diff --git a/conf/moicen/ts.conf b/conf/moicen/ts.conf index 84ac312..6d9d240 100644 --- a/conf/moicen/ts.conf +++ b/conf/moicen/ts.conf @@ -10,7 +10,6 @@ server { ssl_certificate /etc/letsencrypt/live/moicen.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/moicen.com/privkey.pem; # managed by Certbot - set $huiwing_htyts_rust "127.0.0.1:3003"; # huiwing 仓库 htyts(Rust) set $htyuc "http://127.0.0.1:3000"; #htyuc host set $resty_loc "/usr/local/openresty"; @@ -23,7 +22,7 @@ server { if ($request_method = 'OPTIONS') { return 200; } - proxy_pass http://$huiwing_htyts_rust/api/v1/ts/; + proxy_pass http://127.0.0.1:3003/api/v1/ts/; } }