NGINX load balancing - Proxy

Carlos Renato crenatovb at gmail.com
Wed Feb 16 16:05:27 UTC 2022


Hi Francis, thanks you!

Em ter., 15 de fev. de 2022 às 13:49, Francis Daly <francis at daoine.org>
escreveu:

> On Tue, Feb 15, 2022 at 12:31:06PM -0300, Carlos Renato wrote:
>
> Hi there,
>
> > This what I get when trying to start NGINX with the simplified file.
> >
> > [root at proxy conf.d]# cat webgateway.conf
> > upstream webgateway {
> >    server 192.168.239.151:9090;
> >    server 192.168.239.152:9090;
> > }
> >
> > server {
> >    listen 9191;
> >    proxy_pass webgateway;
> >   }
> > }
>
> I suggest: remove or rename that webgateway.conf file, so that it will not
> match whatever "include" line is already in your /etc/nginx/nginx.conf.
>
> Then add those 10 lines to your /etc/nginx/nginx.conf, inside the
> already-existing "stream{}" block; or create a new "stream{}" block
> between the "events{}" block and the "http{}" block that are already in
> your nginx.conf, and put those 10 lines inside that.
>
>
> The reason is: when nginx runs, it reads one config file. That config
> file might "include" some others. Typically, there is something like
> "include /etc/nginx/conf.d/*.conf;" within the http{} block; but we do
> not want to have this upstream-and-server config within http{}; it must
> be within stream{}.
>
> If your nginx binary does not include stream{}, then you probably want
> to see about getting a new binary, if you want to use nginx to do the
> thing that you want to do.
>
> Good luck with it,
>
>         f
> --
> Francis Daly        francis at daoine.org
> _______________________________________________
> nginx mailing list -- nginx at nginx.org
> To unsubscribe send an email to nginx-leave at nginx.org
>


--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20220216/1dd1848a/attachment.htm>


More information about the nginx mailing list