nginx解析时候会解析到ipv6


2024/08/23 16:39:10 [error] 820094#820094: *348411665 connect() to [240e:f7:8e00:501:70::52]:443 failed (101: Unknown error) while connecting to upstream, client: 。。。。。。。。
 upstream: "https://[240e:f7:8e00:501:70::52]:443/view/。。。

这里的 240e:f7:8e00:501:70::52 是ipv6, 也不知道为什么,时不时的出现这种。

        resolver 114.114.114.114 valid=5 ipv6=off;


resolver address ... [valid=time] [ipv4=on|off] [ipv6=on|off] [status_zone=zone];

默认情况下,nginx ipv4 和 ipv6地址都会解析。

By default, nginx will look up both IPv4 and IPv6 addresses while resolving

If looking up of IPv4 or IPv6 addresses is not desired, the ipv4=off (1.23.1) or the ipv6=off parameter can be specified.
Resolving of names into IPv6 addresses is supported starting from version 1.5.8.

阅读量: 269
发布于:
修改于: