Skip to content

[Docker] Gitlab with SSL enabled doesn't respond behind nginx-proxy

I've deployed GitLab using the official CE docker image. It's sitting behind Jwilder's nginx-proxy.

Now I'd like to switch to serving Gitlab via SSL. I placed the certificate in the appropriate place. It's also working on the Nginx side. However once I restart the Nginx-container with external_url starting with https:// instead of http:// I only get 502 errors.

environment:
    GITLAB_OMNIBUS_CONFIG: |-
      external_url 'https://git.example.com'

image

When I use http:// the browser complains about mixed content

image

I also tried this (which was suggested here which didn't work:

nginx['proxy_set_headers'] = { "X-Forwarded-Proto" => nil, "X-Forwarded-Ssl" => nil, "X-Real-IP" => nil }

What am I doing wrong?