最佳答案
upstream apache {
server 127.0.0.1:8080;
}
server{
location ~* ^/service/(.*)$ {
proxy_pass http://apache/$1;
proxy_redirect off;
}
}
The above snippet will redirect requests where the url includes the string "service" to another server, but it does not include query parameters.