proxy http requests to different port numbers?
Francis Daly
francis at daoine.org
Sun Sep 29 08:24:35 UTC 2019
On Thu, Sep 26, 2019 at 02:40:55PM -0400, lvic4594 wrote:
Hi there,
> Looking for workaround: are there any available proxy modules (
> specifically interested in ngnx) that would allow to map request urls to
> different port numbers? So that, for example: request for
> "http://myserver.com/rest1/api/index.html" would be forwarded to
> "http://myserver.com:8080/api/index.html"...
That sounds like what nginx's proxy_pass is for, no?
http://nginx.org/r/proxy_pass
==
location /rest1/ {
proxy_pass http://myserver.com:8080/;
}
==
plus whatever extra configuration your service needs.
(It does assume that the API is happy to be reverse-proxied.)
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list