Welcome! Log In Create A New Profile

Advanced

RE: Q: http2 and http1 virtual hosts both works via HTTP/2 - bug of feature?

Reinis Rozitis
May 26, 2023 07:06AM
> Observed nginx's version 1.22.1 questionable behaviour with two virtual hosts, one with H2 - enabled, second without http2 support.
> Both on the same IP and port, with different domain names/server names.
>
> Is it a bug, feature, my misconfiguration or just not needed by anyone?

The short answer is - yes it is supposed to be like that and you would need either to use different ports or different ips for the virtual hosts.

If I'm not wrong the longer answer is that nginx groups all the capabilities for ip:port when listening on it and since the http2 selection happens at TLS handshake but the virtual server selection happens later at SNI it's problematic to switch it off at that phase.


There have been couple similar requests/questions in past (mainly for specific cipher configuration per virtual server) but out of interest - what is the reason/use case for disabling http2 for a particular virtualhost but leaving it for others?

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Fwd: Q: http2 and http1 virtual hosts both works via HTTP/2 - bug of feature?

Andrey Kulikov May 25, 2023 03:26PM

RE: Q: http2 and http1 virtual hosts both works via HTTP/2 - bug of feature?

Reinis Rozitis May 26, 2023 07:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready