Ubuntu 20.04.3
nginx version: nginx/1.18.0 (Ubuntu)
Hello,
I just followed a simple procedure to set ngnix to listen to a specific IPv6 address https://geekflare.com/enable-ipv6-nginx-apache/ and we encountered an error. Bellow are some relevant info:
ip a |g inet6
inet6 ::1/128 scope host
inet6 fe80::6e35:7039:2681:db1f/64 scope link noprefixroute
inet6 fe80::42:d3ff:feaf:2ad/64 scope link
change /etc/nginx/sites-available/default to listen to IPv6 address, note the '[]' were included:
listen [fe80::6e35:7039:2681:db1f]:80 default_server;
no other servers listen on p:80:
lsof -i :80 | grep LISTEN
and succesfully fails:
nginx[16359]: nginx: [emerg] bind() to [fe80::6e35:7039:2681:db1f]:80 failed (22: Invalid argument)
solved:
ping fe80::6e35:7039:2681:db1f%wlp4s0
PING fe80::6e35:7039:2681:db1f%wlp4s0(fe80::6e35:7039:2681:db1f%wlp4s0) 56 data bytes
64 bytes from fe80::6e35:7039:2681:db1f%wlp4s0: icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from fe80::6e35:7039:2681:db1f%wlp4s0: icmp_seq=2 ttl=64 time=0.067 ms
Thanks!
0 Answers