Is it possible to have HTTP/2 Between frontend and backend in Docker AIO?

Is it possible to configure HTTP/2 from frontend to backend?

Hello everyone I noticed that Nextcloud AIO installs Caddy in the nextcloud-apache container. Considering that I have HAProxy installed on pfSense with the 443rd port out, I’m wondering how I can configure the use of the multiplexed HTTP/2 or H2C protocol between HAProxy and Apache?

It was surprising to me that a Caddy was used in the Nextcloud-Apache container, because I didn’t see it anywhere in the description. I understand that the easiest way without breaking the AIO configuration is to slip it into Docker-Compose.yaml is the path to the self-signed certificate, then an encrypted connection will be established between the proxies and there is a chance that HTTP will be used/2. Perhaps there are easier ways?

I tried using Nextcloud VM, there is no Caddy in it, and I saw a difference of about 20% compared to the disabled HTTP/2 configuration.

For comparison, the numbers for music folder upload (total 3.1 GB NVME SSD):

Nextcloud VM HTTP - 0.9-2.1 Gbps
Nextcloud VM through Haproxy (http/2 SSL) - Apache (http/1.1) - 500-600 Mbs
Nextcloud VM through Haproxy (http/2 SSL) - Apache (http/2 over http) - 600-800 Mbps.

I think it should make a sense