The GitLab SSL Configuration is difficult to get a handle on.
It seems to be very much tailored to Letsencrypt.
https://docs.gitlab.com/omnibus/settings/ssl.html
We are using a Wildcard Certificate purchased from a CA (Entrust).
What I have found I needed to do
Disable letsencrypt in /etc/gitlab/gitlab.rb
letsencrypt['enable'] = false
Just copy my certificates to /etc/gitlab/trusted-certs
company.crt, root.crt and intermediate.crt
Then run gitlab-crt reconfigure
https://docs.gitlab.com/omnibus/settings/ssl.html#install-custom-public-certificates
Don’t I have to configure it? It sees too simple. All other services I have configured for SSL has needed much more configuration.
Well I did what was suggested in the documentation, but GitLab is not accessible.
gitlab-ctl status
down: nginx: 0s, normally up, want up; run: log: (pid 4069) 4314218s
I verified all 3 certificates with
/opt/gitlab/embedded/bin/openssl x509 -in Intermediate.crt -text -noout
Got no errors on them.
I don’t have to change any og the Nginx configuration in /etc/gitlab/gitlab.rb
?
# nginx['enable'] = true
# nginx['client_max_body_size'] = '250m'
# nginx['redirect_http_to_https'] = false
# nginx['redirect_http_to_https_port'] = 80
##! Most root CA's are included by default
# nginx['ssl_client_certificate'] = "/etc/gitlab/ssl/ca.crt"
##! enable/disable 2-way SSL client authentication
# nginx['ssl_verify_client'] = "off"
##! if ssl_verify_client on, verification depth in the client certificates chain
# nginx['ssl_verify_depth'] = "1"
# nginx['ssl_certificate'] = "/etc/gitlab/ssl/#{node['fqdn']}.crt"
# nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/#{node['fqdn']}.key"
# nginx['ssl_ciphers'] = "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256"
# nginx['ssl_prefer_server_ciphers'] = "on"
The nginx configuration led me to a different SSL configuation documentation.
https://docs.gitlab.com/omnibus/settings/nginx.html#manually-configuring-https
That seemed to work. Now our GitLab instance is accessible through HTTPS.
The GitLab SSL Configuration documentation needs to be updated. One single page covering all options.