Advice in regards to configuration

Francis Daly francis at daoine.org
Tue Mar 5 23:52:12 UTC 2019


On Mon, Mar 04, 2019 at 04:30:00PM -0500, Brandon Mallory wrote:

Hi there,

> I was thinking I could have the windows client point to a public ip and then a location maybe account number. So it would look like 
> 
> Client 1
> public ip/12345 forward to private IP 10.45.2.1 (linux server)
> Client 2
> Public ip/54321 forward to private IP 10.45.2.2 (linux server)
> 
> Similar to how http uses the location 
> Www.domain.com/test you can forward to a location 

If your application makes http requests, then you can use nginx's http
system to proxy_pass each request to a suitable upstream. You can,
for example, use different upstreams for different requests (location).

If you application does not make http requests, then you can use nginx's
stream system to proxy_pass each connection to a suitable upstream. There
is no http request, so there is no location block to use. You need to find
some way of determining the correct upstream for each incoming connection.

One way is to have nginx listen on multiple ports, so that anyone
connecting to nginx:10001 has the connection proxied to 10.45.2.1:10101,
and anyone connecting to nginx:10002 has the connection proxied to
10.45.2.2:10101.

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list