Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab self host SSL issues - validation failed for domain

I am attempting to setup gitlab self host, which has been relatively easy, but have started to stumble at the let's encrypt setup part of the integration.

There was an error running gitlab-ctl reconfigure:

letsencrypt_certificate[gitlab.cloudcreations.co.uk] (letsencrypt::http_authorization line 3) had an error: RuntimeError: acme_certificate[staging] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/resources/certificate.rb line 20) had an error: RuntimeError: [gitlab.cloudcreations.co.uk] Validation failed for domain gitlab.cloudcreations.co.uk

I've gone through permissions, several other tutorials and guides online but am not able to fix this so far. I think it may be to do with the domain itself (which would make sense from the issue I'm seeing...). I've run who.is over the domain and can't see the issue myself. Help greatly appreciated!

like image 747
MaxRev17 Avatar asked Aug 19 '18 13:08

MaxRev17


1 Answers

Two things you should check. In your /etc/gitlab/gitlab.rb file, make sure you have the following in addition to your Let's Encrypt values:

nginx['redirect_http_to_https_port'] = 80
nginx['redirect_http_to_https'] = true

As well, make sure that your firewall doesn't block 80 (HTTP) or 443 (HTTPS). If it does, Let's Encrypt can't verify that it's accessible.

Edit : After modifications, you have to restart Gitlab:

gitlab-ctl restart
like image 61
Dave Russell Jr Avatar answered Oct 07 '22 22:10

Dave Russell Jr