sra*_*ain 5

这可能会有所帮助:

server {
    listen        80;
    server_name       test1.test.com;

    location ~ ^/app/(.*)$ {
        proxy_pass       http://192.168.154.102:$1;
    }
}
Run Code Online (Sandbox Code Playgroud)

注意:如果您访问test1.test.com/app/8081,nginx 会将请求传递给http://192.168.154.102:8081/app/8081

有关proxy_pass的更多信息