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
Using the webroot path /var/www/letsencrypt for all unmatched domains.
Waiting for verification…
Challenge failed for domain
http-01 challenge for
Cleaning up challenges
Some challenges have failed.


  • The following errors were reported by the server:

    Type: unauthorized
    Detail: Invalid response from Sign in · GitLab
    []: "\n<html
    class=“devise-layout-html”>\n<head prefix=“og:”>\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

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

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