Can't change lighttpd's port for HaProxy reverse proxy

There’s a change in the problem. It’s almost working, though!

It’s accepting a connection on git.example.com and forwarding it to port 3000!

I’m getting this error on firefox:
SSL_ERROR_RX_RECORD_TOO_LONG

This is happening on both lighttpd and Gitea.

I think it has something to do with HaProxy. Are you any help here, or?