11

I've nginx-proxy and nginx-server docker containers.

client browser < > nginx-proxy is http2 and 443 via proxy_pass.

nginx-proxy < > nginx-server is http1 and I'd like to move it to http2 but without SSL - since they are both on same server, I don't see benefit of encrypting traffic.

I read nginx docs, and they say that it supports http2 without ssl. so I added 80 http2; to listen directive in nginx-server vhost.

However, instead of showing website, browser downloads the file with following content:

0000 1204 0000 0000 0000 0300 0000 8000
0400 0000 0000 0500 ffff ff00 0004 0800
0000 0000 7fff 0000 0000 0807 0000 0000
0000 0000 0000 0000 01

it looks awfully like this issue but mine is not browser <> nginx issue but nginx <> nginx issue. Which shouldn't exist, because docs say nginx supports http2 without ssl.

How do I let nginx-proxy understand that backend nginx-server speaks http2... I guess that's the problem since hex dump says: malformed packet.

This issue states that it is not possible, and will not be implemented.

1 Answers1

3

Your benefits of doing this will be minimal because the latency is very low between software on the same server. Given it's either very difficult or impossible I wouldn't spend your time on this.

Tim
  • 30,383
  • 6
  • 47
  • 77
  • it is also impossible as I found out. –  May 10 '16 at 07:39
  • 3
    Why is it impossible? Most web browsers don't currently support HTTP/2 without SSL, but hopefully eventually some will, at least with third part plug-ins anyways. The speed of HTTP/2 without the overhead of SSL would be great to offer as an option. – orrd Jul 22 '16 at 22:50
  • 1
    For those that are trying to dispute this guy, directly from NGINX themselves....You are misinterpreting what HTTP2 means and its usefulness...In the OP scenario it would make it worse... https://serverfault.com/questions/765258/use-http-2-0-between-nginx-reverse-proxy-and-backend-webserver So to those that are down voting this answer or fighting against the answer of impossible, that is actually the correct answer. So all-in-all its just bringing a good question down. – ZaxLofful Aug 20 '18 at 21:44
  • It is noteworthy that while nginx reverse-proxy does not support HTTP2, haproxy does. – DustWolf Oct 13 '20 at 09:55