Hello!

On Mon, Jan 09, 2017 at 11:01:40AM +0800, [email protected] wrote:

> 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? and if a request comes at such a 
> port, which server would serve this request, by radomly or 
> round-robin?

Duplicate listenining sockets are not allowed in stream{} and will 
return "duplicate "..." address and port pair in ..." if you'll 
try to configure duplicate sockets.

In http{}, requests are routed based on the server names 
configured in the servers with the listening socket in question.  
See here for details:

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

-- 
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to