# Enabling http2 on backends in tcp mode

**URL:** <https://discourse.haproxy.org/t/enabling-http2-on-backends-in-tcp-mode/7654>\
**Category:** Help!\
**Created:** [May 11, 2022, 2:51pm UTC](https://discourse.haproxy.org/t/enabling-http2-on-backends-in-tcp-mode/7654 "2022-05-11T14:51:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elfranne](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@elfranne](https://discourse.haproxy.org/u/elfranne)\
**Post date:** [May 11, 2022, 2:51pm UTC](https://discourse.haproxy.org/t/enabling-http2-on-backends-in-tcp-mode/7654/1 "2022-05-11T14:51:34Z")

</div>

I am trying to configure HAProxy to work with h2 backend using tcp load balancing mode:

```auto
listen 443pp
  bind [redacted]:443 interface ens224
  mode tcp
  balance roundrobin
  log global
  source [redacted]
  server backend02 [redacted]:8443 check send-proxy-v2
  server backend03 [redacted]:8443 check send-proxy-v2

```

The backend is Nginx (serving a static file for testing purpose):

```auto
# nginx config:
server {
  listen *:8443 ssl proxy_protocol ; # works
  listen *:8443 ssl proxy_protocol http2; # does NOT work

  server_name backend02-proxy-ssl;

  ssl_certificate /etc/ssl/private/self-signed.crt;
  ssl_certificate_key /etc/ssl/private/self-signed.key;

  index index.html index.htm index.php;
  access_log /var/log/nginx/ssl-backend02-proxy-ssl.access.log;
  error_log /var/log/nginx/ssl-backend02-proxy-ssl.error.log;
  
  location / {
    root /var/www/html;
    index index.html index.htm index.php;
  }
}

```

Curl on the load balanced ip fails with this message when http2 is enabled in Nginx:

```auto
* Empty reply from server

```

The Nginx backend is responding to http2 request, tested with `curl --haproxy-protocol -k https://[redacted]:8443`

HAProxy version:

```auto
HAProxy version 2.4.16-1ppa1~focal 2022/04/29 - https://haproxy.org/
Status: long-term supported branch - will stop receiving fixes around Q2 2026.
Known bugs: http://www.haproxy.org/bugs/bugs-2.4.16.html
Running on: Linux 5.4.0-110-generic #124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022 x86_64

```

Nginx version:

```auto
nginx version: nginx/1.18.0 (Ubuntu)

```

OS is Ubuntu 20.04.
