SSL not working on Serverpilot

(BTW it shows both error 521 and error 502 one after the other)