hostname based listen directive with A/AAAA RRs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

hostname based listen directive with A/AAAA RRs

Jim Popovitch
Hello,

Will the following listen statement bind to all addrs (2xIPv4 and
2xIPv6)?

server {
   listen www.nginx.org:443 ssh http2 ipv6only=no bind;
    ....
}


-Jim P.
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: hostname based listen directive with A/AAAA RRs

Maxim Dounin
Hello!

On Tue, Aug 14, 2018 at 04:53:23PM -0400, Jim Popovitch wrote:

> Hello,
>
> Will the following listen statement bind to all addrs (2xIPv4 and
> 2xIPv6)?
>
> server {
>    listen www.nginx.org:443 ssh http2 ipv6only=no bind;

No.  If a hostname is used in the listen directive, it will use
the first address the name resolves to.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: [Nginx] Re: hostname based listen directive with A/AAAA RRs

Jim Popovitch
On Wed, 2018-08-15 at 03:06 +0300, Maxim Dounin wrote:

> Hello!
>
> On Tue, Aug 14, 2018 at 04:53:23PM -0400, Jim Popovitch wrote:
>
> > Hello,
> >
> > Will the following listen statement bind to all addrs (2xIPv4 and
> > 2xIPv6)?
> >
> > server {
> >    listen www.nginx.org:443 ssh http2 ipv6only=no bind;
>
> No.  If a hostname is used in the listen directive, it will use 
> the first address the name resolves to.

Thank you,

-Jim P.
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx