nginx fails to listen on specific IPv6 address
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. Below are some relevant info: ip a |g inet6 Code:
inet6 ::1/128 scope host Code:
listen [fe80::6e35:7039:2681:db1f]:80 default_server; Code:
lsof -i :80 | grep LISTEN Code:
nginx[16359]: nginx: [emerg] bind() to [fe80::6e35:7039:2681:db1f]:80 failed (22: Invalid argument) Code:
ping -I wlp4s0 fe80::6e35:7039:2681:db1f Code:
ping fe80::6e35:7039:2681:db1f%wlp4s0 Thanks! |
Quote:
AFAIK ipv6 addresses starting with fe80 are link-local addresses. I guess you cannot assign such an address to a webserver. You may give a valid ipv6 address to your interface and test. |
I see, I did not know that, thanks!
then how come IPv4 can listen on local address? |
Quote:
tl;dr: link-local is not the same as local. IPv6 can listen on (most) local addresses. |
All times are GMT -5. The time now is 08:48 AM. |