Gitlab CE - Setting nginx redirect_http_to_https makes requests timeout

Hello, i’m running gitlab community edition, and i’ve been trying to set up https for it.
I managed to get the https working, i’m using port 256 instead of the default port so entering https://example.com:256, brought up my gitlab page and it worked flawlessly. But then i noticed a problem, you could still navigate to http://example.com:256 and it would bring up an nginx error, since my external_url is https://example.com:256. So i set the redirect_http_to_https parameter to true and now all my requests timeout. I’ve tried to change the redirect_http_to_https_port setting to 256, but that hasn’t done anything. What i have noticed is that if i set the redirect_http_to_https_port setting to 257 and navigated to http://example.com:257, it would bring me to https://example.com:256.