有哪些 proxy_pass 协议?

Clo*_*tly 2 nginx

随着proxy_pass在nginx的我可以使用:

proxy_pass http://backend;
proxy_pass https://backend;
Run Code Online (Sandbox Code Playgroud)

问题是:我可以使用哪些协议?特别是我想在明文(h2c)上使用 HTTP-2。这可能吗?是否有我可以使用的协议列表proxy_pass

Ben*_*ley 5

docs 中所述,仅允许使用 http 和 https 。Nginx 作为代理时不支持 http2。

相反,你可以使用nghttp2它不支持http2过明文(与选项proto=ht--backend参数)。