Re: 答复: Re: having nginx listen the same port more than once

Vladimir Homutov vl at
Tue Feb 14 09:03:51 UTC 2017

On Tue, Feb 14, 2017 at 04:09:10PM +0800, he.hailong5 at wrote:
> now I understand the duplicate listen ports configured in the http
> block can be used to implement virtual hosts.
> but what's the purpose to allow this in the stream block? in my
> practise (with, nginx will randomly select a backend to
> serve the tcp/udp request which seems useless.

yes, in stream it does not make sense and was not intented to work.
> b.t.w, I also tried with 1.11.x today, looks like configuring
> duplicate listen ports in stream block is forbidden.

correct, this was fixed by this commit:

More information about the nginx mailing list