0

I have a backend server that receives HTTP/1.1, HTTP/2.0 plaintext, grpc plaintext over HTTP/2.0 (no tls).

I want to use nginx to receive HTTP request from user (HTTP/1.1, HTTP/2, etc), and pass to backend, preserving HTTP version without using passthrough.

so, desired state is below.

1. client <-(HTTP/1.1 plaintext)-> nginx <-(HTTP/1.1 plaintext)-> backend
2. client <-(HTTP/2 plaintext)-> nginx <-(HTTP/2 plaintext)-> backend
3. client <-(grpc over HTTP/2 plaintext)-> nginx <-(grpc over HTTP/2 plaintext)-> backend
on a same ip, same port.

is this possible?

  • Search is your friend https://serverfault.com/search?q=nginx+reverse+proxy+ – user9517 Feb 15 '22 at 08:35
  • You probably do need passthough because the nginx reverse proxy module and the [`proxy_http_version`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version) directive only allows you to select HTTP protocol version `1.0` or `1.1` and talking to backends with HTTP/2 is not supported at all. See this Q&A https://serverfault.com/questions/765258/use-http-2-0-between-nginx-reverse-proxy-and-backend-webserver – Bob Feb 15 '22 at 11:08

0 Answers0