Gitlab Docker with Apache reverse proxy and SSL

Im am trying to get the Gitlab Docker image to run behind an Apache reverse proxy. Everything is fine without SSL. But as soon as I want to enable SSL within Gitlab, I cannot reach Gitlab anymore. My Apache reverse proxy conf redirects successfully to https, but then I am stuck. I tried a lot of things already, but either there is an error message in the browser complaining that the certificate is not for but for, or it complains because it is kind of a self signed certificate and not a Letsencrypt certificate.

This is my docker-compose file:

version: '3'

        image: 'gitlab/gitlab-ce:latest'
        restart: always
        hostname: ''
                external_url ''
                gitlab_rails['time_zone'] = "UTC"
                letsencrypt['contact_emails'] = [""]
                nginx['redirect_http_to_https'] = true
                nginx['proxy_set_headers'] = {
                    "X-Forwarded-Proto" => "http",
                    "X-Forwarded-Ssl" => "on",
                    "X-Url-Scheme" => "https"
            - '10080:80'
            - '10443:443'
            - '10022:22'
            - '/srv/gitlab/config:/etc/gitlab'
            - '/srv/gitlab/logs:/var/log/gitlab'
            - '/srv/gitlab/data:/var/opt/gitlab'

This is my Apache vhost conf file for the non-SSL-vhost:

<VirtualHost *:80>
   ErrorLog /var/log/apache2/gitlab-error.log
   CustomLog /var/log/apache2/gitlab-access.log combined
   RewriteEngine On

   <Location />
      Options -Indexes -ExecCGI +FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all

   ProxyPreserveHost On
   ProxyRequests off
   ProxyPass / http://localhost:10080/
   ProxyPassReverse / http://localhost:10080/


Question is: Do I need a special Apache vhost also for SSL, or is this handled by nginx inside the Docker container? If I need this file, what would it look like? If not, what am I missing in the docler compose file?

Thanks so much for helping!

Did you ever figure this out? I am also doing the same on a server that has multiple docker images and various sites with Apache. 2.4.


Unfortunately not. I switched to a new server and decided to dockerize everything and so I used nginx-proxy with gitlab instead of apache.

Any update on this?