SSL wrong version number with nginx proxy

Hi! I’m running seafile from docker on Ubuntu proxied behind an nginx server. At least I’m trying to, but I get the following message in the nginx logs:

[error] 2321792#2321792: *35 SSL_do_handshake() failed (SSL: error:0A00010B:SSL routines::wrong version number) while SSL handshaking to upstream, client: <ip>, server: www.<domain>.com, request: "GET /files HTTP/1.1", upstream: "", host: "www.<domain>.com"

nginx version: nginx/1.18.0 (Ubuntu)
Ubuntu 22.04.3 LTS

Any ideas?