H
H
hostadmin2019-12-31 22:08:05
linux
hostadmin, 2019-12-31 22:08:05

Why doesn't NGINX see ipv6 by default on Debian 9?

There is a server on Debian 9, with a freshly installed nginx, the server has 1 ipv4 and 2 ipv6 issued. There is a domain with configured A, AAAA records pointing to this server.
The squiggle is that nginx responds to ipv4 requests without any problems, but responds 404 to domain requests via ipv6.
Those. By A record, the site opens, and by AAAA nginx responds with 404.
At the same time, if you directly specify the required ip (v6) in the nginx config for the site, then everything starts working as it should.
Here is a config that works (ipv4 & ipv6):

server{
    listen 80;
    listen [xxxx:xxx:x:xx::xxx]:80;

    server_name server.com;

and only ipv4 works with this config:
<code>server{
    listen 80;

    server_name server.com;</code>

How to make nginx be less picky?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2019-12-31
@hostadmin

if just
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question