Can I enable HTTP/2 for specific server blocks (virtual hosts) only, on Nginx?
问题 I have several virtual hosts on nginx . Can I enable HTTP/2 for specific virtual hosts only on nginx ? When I enable HTTP/2 for a virtual host, like: server { listen 443 ssl http2; server_name a.b.com; ... } I can access a.b.com by HTTP2.0. But now every other virtual host on the same nginx supports HTTP/2 too. But I want to access them only by HTTP/1.1 . Is the http2 directive at server level? 回答1: Short answer: not possible on your current setup. When starting, nginx first creates a