Git-ce Release 18.2 - web interface via https

I set up a git-ce on a virtual-server on debian 13 using the git-repository:

curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh

It works fine, but i want to secure the web-interface by using https.

I got the certificates from letsencrypt.

Access to the web interface via https is not possible via the browser, even though the configuration corresponds to the documentation.

official documentation

The https port 443 is not open.

There is no firewall and no provider blocking.

root@git:/etc/gitlab# nmap git.mydomain.de
Starting Nmap 7.93 ( https://nmap.org ) at 2025-09-12 15:39 UTC
Nmap scan report for git.mydomain.de (127.0.1.1)
Host is up (0.0000070s latency).
Not shown: 997 closed tcp ports (reset)
PORT   STATE SERVICE
22/tcp open  ssh
25/tcp open  smtp
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.15 seconds


Here is the relevant excerpt from the configuration file:

external_url 'http://git.mydomain.de'
nginx['enable'] = true
nginx['client_max_body_size'] = '0'
nginx['redirect_http_to_https'] = true
nginx['redirect_http_to_https_port'] = 443


gitlab-ctl reconfigure shows no error after changing the configuration file.

I used the official documentation which is linked in the config-file /etc/git/gitlab.rb

https://docs.gitlab.com/omnibus/settings/nginx/

but is doesn’t work.

There are no errors in the logfiles.

I don’t know what more to do :-/

external_url has to be configured as https not http. eg:

external_url 'https://git.mydomain.de'

that will attempt to create SSL certs automatically with letsencrypt, however if you already have created them, then you need to set these two manually:

nginx['ssl_certificate'] = "/etc/letsencrypt/live/git.mydomain.de/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/git.mydomain.de/privkey.pem"

after those changes, reconfigure gitlab and it should work.

1 Like

You got it - the only thing i do was to disable:

nginx[‘enable’] = true
nginx[‘client_max_body_size’] = ‘0’
nginx[‘redirect_http_to_https’] = true
nginx[‘redirect_http_to_https_port’] = 44

The certs where already in - i forgot this.

Thank you very much :slight_smile:

1 Like