Article 5SZ2F nginx fails to listen on specific IPv6 address

nginx fails to listen on specific IPv6 address

by
lattimro
from LinuxQuestions.org on (#5SZ2F)
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
inet6 fe80::6e35:7039:2681:db1f/64 scope link noprefixroute
inet6 fe80::42:d3ff:feaf:2ad/64 scope linkchanged /etc/nginx/sites-available/default to listen to IPv6 address, note the '[]' were included:

Code:listen [fe80::6e35:7039:2681:db1f]:80 default_server;no other servers listen on p:80:

Code:lsof -i :80 | grep LISTENand succesfully fails:

Code:nginx[16359]: nginx: [emerg] bind() to [fe80::6e35:7039:2681:db1f]:80 failed (22: Invalid argument)found out something weird at least at my level of understanding I do not know if it is related but I do not think that is what ping should normally reply:
Code:ping -I wlp4s0 fe80::6e35:7039:2681:db1f
ping: Warning: source address might be selected on device other than: wlp4s0
PING fe80::6e35:7039:2681:db1f(fe80::6e35:7039:2681:db1f) from :: wlp4s0: 56 data bytes
Thanks!latest?d=yIl2AUoC8zA latest?i=lpNImy56ZZg:IaftkwzQ2bM:F7zBnMy latest?i=lpNImy56ZZg:IaftkwzQ2bM:V_sGLiP latest?d=qj6IDK7rITs latest?i=lpNImy56ZZg:IaftkwzQ2bM:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments