documentation icon indicating copy to clipboard operation
documentation copied to clipboard

nginx snippets don't allow ipv6

Open creeper123123321 opened this issue 4 years ago • 4 comments

i was having a problem with the copy-pasted configuration caused by a missing Listen [::]:...

creeper123123321 avatar Nov 15 '21 11:11 creeper123123321

What copy pasted Nginx snippet? Our web server configuration for Nginx doesn't specify ipv6 or ipv4. It specifies ports and Nginx would listen on both ipv4 and ipv6 if they are available.

trenutoo avatar Nov 15 '21 12:11 trenutoo

https://github.com/pterodactyl/documentation/blob/master/.snippets/webservers/nginx.conf#L10 i needed to add a listen [::]:443 ssl http2; line because it was falling into the default server:

        listen 443 ssl default_server;
        listen [::]:443 ssl default_server;

creeper123123321 avatar Nov 15 '21 12:11 creeper123123321

This is because you have other server blocks on the same web server.

Forcing ipv6 would cause Nginx to fail for users that don't have ipv6:

socket() [::]:80 failed (97: Address family not supported by protocol).

We either ignore this, or add a note regarding ipv6. However, notes are usually ignored. I would need to look more into the possible issues ipv6 might cause

trenutoo avatar Nov 15 '21 12:11 trenutoo

Perhaps just add 2 more tabs, 2 tabs for IPv4 SSL and non-SSL, 2 tabs for IPv6 SSL and non-SSL

PadowYT2 avatar Mar 23 '23 15:03 PadowYT2