Gitlab SSL certificate Letsencrypt

Hello, I am very new with Gitlab server and I was told by one of our departments to install Gitlab server for one of the projects. I installed Gitlab server on Ubuntu 20.4 open SSH, and it is up and running now, but, the issue I am facing is SSL certificate. I am trying to use “Lets encrypt” , but, it does not verify our domain .
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for gitlab.kia.ca
Using the webroot path /var/www/letsencrypt for all unmatched domains.
Waiting for verification…
Challenge failed for domain gitlab.kia.ca
http-01 challenge for gitlab.kia.ca
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: gitlab.kia.ca
    Type: unauthorized
    Detail: Invalid response from Sign in · GitLab
    [207.219.188.52]: "\n<html
    class=“devise-layout-html”>\n<head prefix=“og:
    http://ogp.me/ns#”>\n<meta charset=“utf-8”>\n<link rel=“preloa”

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address.

Can you please help

Hi,
I get same error.

First of all I delete redirict to ssl, from location .well-known/acme-challenge, because letsencrypt webroot challende work on http.

server {
listen 80 default_server;
server_name _;
location /.well-known/acme-challenge/ {
root /srv/www/letsencrypt/;
}

after this I got error

Detail: Invalid response from
http://gitlab.example.com/.well-known/acme-challenge/T_u37lMh9P8mKSnm9zLKeER6cL

In my nginx-error log was line
“”/usr/share/nginx/html/.well-known/acme-challenge/lvVMJX0xZgfLYIHBVLdZU0h0GuGJQsrqXVn7hYnV1LY" failed (2: No such file or directory)"

so I made simlink from my webroot to /usr/share/nginx/html
ln -s /srv/www/letsencrypt/.well-known/ /usr/share/nginx/html/.well-known

I think it’s not very good solution, but it’s works. If I’ll found why nginx write in another directory, I try to fix answer