NGINX load balancing - Proxy

Francis Daly francis at daoine.org
Tue Feb 15 14:13:59 UTC 2022


On Tue, Feb 15, 2022 at 10:29:50AM -0300, Carlos Renato wrote:

Hi there,

> My file is like this.

Untested by me, but I have edited this to now resemble what I think
you want...

> upstream webgateway {
>    server 192.168.239.151:9090;
>    server 192.168.239.152:9090;
> }
> 
> server {
>    listen 9191;
>    proxy_pass webgateway;
> }

...that is, keep your upstream{} but remove the keepalive; adjust your
server{} to just have "listen" and a different "proxy_pass"; and put
the whole thing inside "stream{}" not "http{}".

> I'm able to open HTTP requests in the client's browser.
> The problem is being the HTTPS requests.
> Is there any way for NGINX to receive the traffic and forward it (balanced)
> to the proxy servers?
> A simpler way. That way I could include the Web Gateway certificate in the
> Windows client.

If I have understood correctly what you are trying to do, the notes at
https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/
look relevant. That expands on what is at
http://nginx.org/en/docs/stream/ngx_stream_core_module.html.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list