Welcome! Log In Create A New Profile

Advanced

Re: proxy http requests to different port numbers?

Francis Daly
September 29, 2019 04:26AM
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@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy http requests to different port numbers?

lvic4594 September 26, 2019 02:40PM

Re: proxy http requests to different port numbers?

Francis Daly September 29, 2019 04:26AM

Re: proxy http requests to different port numbers?

lvic4594 October 01, 2019 10:17AM

Re: proxy http requests to different port numbers?

Francis Daly October 02, 2019 08:08AM

Re: proxy http requests to different port numbers?

lvic4594 October 03, 2019 09:14AM

Re: proxy http requests to different port numbers?

Francis Daly October 03, 2019 11:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready