macbre / docker-nginx-http3

Stable and up-to-date root-less nginx with quic + http/3, google brotli compression, njs, GeoIP2, and Grade A+ SSL config
https://hub.docker.com/r/macbre/nginx-http3
161 stars 53 forks source link

duplicate listen options for 0.0.0.0:443 #60

Closed Y0ngg4n closed 2 years ago

Y0ngg4n commented 2 years ago

When i use you provided config

# quic and http/3
    listen 443 http3 reuseport;

    # http/2 and http/1.1
    listen 443 ssl http2;

i get following error: duplicate listen options for 0.0.0.0:443

macbre commented 2 years ago

Which version of the nginx are you running? The one from this git repository's container?

reuseport should work just fine and allow you to handle both http/2 and h3 requests at the same port.

Y0ngg4n commented 2 years ago

yes the one from this git repositorys container

macbre commented 2 years ago

Interesting, there's the same section in the config file used for testing the container - https://github.com/macbre/docker-nginx-http3/blob/master/tests/https.conf#L3-L7

Can you provide the full nginx config of yours?

Y0ngg4n commented 2 years ago

Dont know maybe its a local bug of me does not appear now. Dont know how i fixed it.

ivanjx commented 4 months ago

for anyone else that stumbled upon this make sure you only use reuseport on ONE listen directive even if you have multiple server blocks.

zzlw commented 4 months ago

for anyone else that stumbled upon this make sure you only use reuseport on ONE listen directive even if you have multiple server blocks.

What about multiple servers?

ivanjx commented 4 months ago

@zzlw show me your config