Francis Daly
July 25, 2013 04:02AM
On Thu, Jul 25, 2013 at 03:50:02AM -0400, drook wrote:

Hi there,

> Thanks, I have read this carefully, but this hasn't become more clear for me
> - all the examples contain the IP defined, what about undefined IP (which,
> as I understand, means "listen to this port everywhere") ? Does it receive
> less priority ? Plus, in my case server_name is defined too. I'm not
> complaining, I'm trying to understand better.

A request comes in on an ip:port.

The "listen" directives in each server{} block are considered, to find
the best-match one for that ip:port. Only server{} blocks with that
"listen" directive are considered for the next stage.

(Absent "listen", or "listen" without both a port and address, assume
the default values for the missing parts.)

After that, the server_name is considered, and the one best-match
server_name from the many best-match "listen" servers is chosen.

Is that any clearer? Can you suggest a wording for the manual that might
have made it clearer to you on first reading?

A consequence is that if you want every server{} to be potentially
considered for server_name matching for all requests, you must include
the same best-match "listen" directive in each server{}.

Thanks,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

listen directive

drook July 25, 2013 03:23AM

Re: listen directive

Igor Sysoev July 25, 2013 03:30AM

Re: listen directive

drook July 25, 2013 03:50AM

Re: listen directive

Francis Daly July 25, 2013 04:02AM

Re: listen directive

drook July 25, 2013 04:34AM

Re: listen directive

Ruslan Ermilov July 25, 2013 05:14AM

Re: listen directive

drook July 26, 2013 12:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready