proxy_buffering context and unexpected error

Drew Dixon dwdixon at umich.edu
Wed Mar 3 19:51:33 UTC 2021


Hi there, thanks for the quick reply, sure, the config is rather simple for
some initial testing, I'm not sure the directive being turned off will have
any effect w/ the present config but the directive is not within any "if"
within the "server" context and seems to be throwing an error when I would
expect it not to:

/etc/nginx/conf.d/test.conf:
```
stream {
    upstream upstreams {
        least_conn;
        server 192.168.1.100:9998;
        server 192.168.1.101:9998;
        server 192.168.1.102:9998;
    }

    server {
        proxy_buffering off;
        listen 9998 udp;
        proxy_pass upstreams;
        proxy_timeout 1s;
        proxy_responses 0;
        error_log /var/log/nginx/test-lb.log;
    }
}
```

Thank you!

On Wed, Mar 3, 2021 at 12:40 PM Francis Daly <francis at daoine.org> wrote:

> On Wed, Mar 03, 2021 at 12:02:44PM -0500, Drew Dixon wrote:
>
> Hi there,
>
> > Which states that this is valid within the server context, however
> whenever
> > I attempt to set proxy_buffering to off (proxy_buffering off;) within my
> > server configuration context I receive the error message below:
> >
> > nginx[6203]: nginx: [emerg] "proxy_buffering" directive is not allowed
> here
> > in /etc/nginx/conf.d/test.conf
> >
> > This is clearly within the server context in my config.
>
> Can you show the line, and the surrounding lines or other indentation
> that indicates that your "proxy_buffering" directive is directly within
> "server", and is not, for example, within an "if" within "server"?
>
> The nginx contexts should be understood to be direct-only.
>
> Cheers,
>
>         f
> --
> Francis Daly        francis at daoine.org
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210303/33d03b7d/attachment.htm>


More information about the nginx mailing list