having nginx listen the same port more than once

Reinis Rozitis r at roze.lv
Mon Feb 13 07:13:36 UTC 2017


> I observe that the nginx runs with no error if there are duplicate listen ports configured in the http server block or stream server block.
is this behavior as expected? 

That is how every webserver capable of name based virtual hosts works. 
So yes it's normal and expected.

> and if a request comes at such a port, which server would serve this request, by radomly or round-robin?

http://nginx.org/en/docs/http/request_processing.html

rr



More information about the nginx mailing list