# test.com/webservice/content/1 => http:/127.0.0.1:8080/webservice/content/1
location ~ "/(escenic|studio|webservice|webservice-extensions|live-center-editorial|live-center-presentation)/(.*)" {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080;
}
location proxy_pass Request Received by upstream
-------- -------------------------- ------------------- --------------------
/webapp/ http://localhost:5000/api/ /webapp/foo?bar=baz /api/foo?bar=baz
/webapp/ http://localhost:5000/api /webapp/foo?bar=baz /apifoo?bar=baz
/webapp http://localhost:5000/api/ /webapp/foo?bar=baz /api//foo?bar=baz
/webapp http://localhost:5000/api /webapp/foo?bar=baz /api/foo?bar=baz
/webapp http://localhost:5000/api /webappfoo?bar=baz /apifoo?bar=baz
# This will match for http://localhost/webservice/content/1,
# and not match http://localhost/remote/webservice/content/1
location ~ "^/webservice/(.*)" {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080;
}