How to map URL to port and modified URL? How to map URL to port and modified URL? nginx nginx

How to map URL to port and modified URL?


It is easily accomplished using Nginx:

    location /api/ {            rewrite   ^/api(/.*)$ $1 break;            proxy_pass http://localhost:9000;    }