location ^~ /icon/sice/ {
proxy_redirect off;
proxy_set_header Accept-Encoding '';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://domain.b.com/sice/;
}
如何通过 domain.a.com/icon/sice/?id=123 传递给 domain.b.com/sice/123 呢?找了两天的资料了实在搞不定了。
1
q15158012160 2021-10-28 17:18:31 +08:00
rewrite ^/icon/(.*)$ http://domain.b.com/$1/$arg_id break;
|
2
Aluhao 2021-11-03 10:10:18 +08:00
试试
proxy_pass http://domain.b.com/sice/$request_uri; 我的服务器是这么操作 upstream IndiaApiServer { server 192.168.0.1:8888 weight=1; } proxy_pass http://IndiaApiServer$request_uri; |