<div dir="ltr"><div>If I understand the link correctly, I want to only set options on the `default_server`.<br></div><div><br></div><div>So I know have three vhosts setup, the first is a generic https redirector and looks like:</div><div>>server {<br>> listen 80;<br>> listen [::]:80;<br>> return 301 https://$host$request_uri;<br>>}</div><div><br></div><div>The next starts:</div><div>>server {<br>> listen 443 http3 default_server reuseport;<br>> listen [::]:443 http3 default_server reuseport;<br>><br>> listen 443 ssl http2;<br>> listen [::]:443 ssl http2;<br>><br>> server_name foo;</div><div>></div><div>> add_header Alt-Svc '$http3=":443"; ma=15';</div><div><br></div><div>And the second:</div><div>>server {</div><div>> listen 443;</div><div>> listen [::]:443;</div><div>></div><div>> server_name bar;</div><div>></div><div>> add_header Alt-Svc '$http3=":443"; ma=15';</div><div><br></div><div>The nginx config test passes, but everything is served over HTTP/2.</div><div><br></div><div>Is there something obvious I’m missing here?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 2 Nov 2020 at 13:39, Sergey Kandaurov <<a href="mailto:pluknet@nginx.com">pluknet@nginx.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> On 30 Oct 2020, at 22:21, Jonny Barnes <<a href="mailto:jonnybarnes@gmail.com" target="_blank">jonnybarnes@gmail.com</a>> wrote:<br>
> <br>
> Can we do this?<br>
> <br>
> First issue is if I add the line `listen 443 http3 resueport` to more than one server {} block the nginx conf test gives the following error:<br>
> <br>
> > nginx: [emerg] duplicate listen options for <a href="http://0.0.0.0:443" rel="noreferrer" target="_blank">0.0.0.0:443</a> in /usr/local/nginx/conf/sites-enabled/legolas:2<br>
> > nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed<br>
<br>
That's expected behaviour, see for detailed explanation:<br>
<a href="https://trac.nginx.org/nginx/ticket/1912" rel="noreferrer" target="_blank">https://trac.nginx.org/nginx/ticket/1912</a><br>
<br>
> <br>
> It seemingly works if i only have it for one of my server blocks. But I can‘t get my firefox browser to connect with HTTP/3. It does connect to <a href="http://quic.nginx.org" rel="noreferrer" target="_blank">quic.nginx.org</a> over HTTP/3.<br>
<br>
You may want to hint Firefox about QUIC protocol using Alt-Svc.<br>
<br>
-- <br>
Sergey Kandaurov<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org" target="_blank">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a></blockquote></div>