This turned out to be a layer 8 error. The proxy configuration still was wrong, I missed the ProxyPreserveHost directive, on Apache the minimum required for GitLab is:
ProxyPreserveHost on
RequestHeader add X-Forwarded-Ssl on
RequestHeader set X-Forwarded-Proto "https"
<Proxy *>
Require all granted
</Proxy>
<Location />
ProxyPass unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|http://127.0.0.1/
ProxyPassReverse unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|http://127.0.0.1/
</Location>
<Location /-/cable>
ProxyPass unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|ws://127.0.0.1/-/cable
ProxyPassReverse unix:///opt/gitlab/gitlab/tmp/sockets/gitlab-workhorse.socket|ws://127.0.0.1/-/cable
</Location>