I found an issue regarding putting PBS behind a reverse proxy. I have tried Apache, Caddy and Nginx. For Nginx it "just works", while for the others it stops working when PBS tries to initiate an upgrade to their own protocol, resulting in PBS responding that the Upgrade header is missing.
I did some forensic on Apache, got some logs on Caddy and also briefly checked the code in Caddy, and after reading the Connection/Upgrade standards, PBS seem to be missing sending the Connection header to initiate the upgrade, which the standard requires. Caddy seems to require Connection, so they follow this standard, and apparently Apache does this as well, in relation to the same response they both give. However, Nginx seems to not follow this standard, hence why it "just works".
I wonder if this is really the case with PBS, that when trying to upgrade the connection to proxmox-backup-protocol-v1 or proxmox-backup-reader-protocol-v1 it wont send the Connection header? If so, is it considered a bug or a feature? I would say a bug, because it does not follow the standard.
An additional issue, not regarding to PBS but good for anyone stumbling upon this issue, is that Apache proxy module does not support upgrade names longer than 16 characters. It is possible to get around this with the rewrite module.
I did some forensic on Apache, got some logs on Caddy and also briefly checked the code in Caddy, and after reading the Connection/Upgrade standards, PBS seem to be missing sending the Connection header to initiate the upgrade, which the standard requires. Caddy seems to require Connection, so they follow this standard, and apparently Apache does this as well, in relation to the same response they both give. However, Nginx seems to not follow this standard, hence why it "just works".
I wonder if this is really the case with PBS, that when trying to upgrade the connection to proxmox-backup-protocol-v1 or proxmox-backup-reader-protocol-v1 it wont send the Connection header? If so, is it considered a bug or a feature? I would say a bug, because it does not follow the standard.
An additional issue, not regarding to PBS but good for anyone stumbling upon this issue, is that Apache proxy module does not support upgrade names longer than 16 characters. It is possible to get around this with the rewrite module.