我有一个具有以下配置的nginx服务器:
server {
location /foo/ {
proxy_pass https://192.168.0.21:6443;
}
location /bar/ {
proxy_pass https://192.168.0.21;
}
location /other/ {
proxy_pass https://192.168.0.21:7443/;
}
}
我需要的是
https://my.domain.com/foo/rest_of_url-> https://192.168.0.21:6443/foo/rest_of_url
https://my.domain.com/bar/rest_of_url-> https://192.168.0.21/bar/rest_of_url
https://my.domain.com/other/rest_of_url-> https://192.168.0.21:7443/else/rest_of_url
我应该如何配置服务器?