Configuring a self-signed SSl certificate

Hello, please explain how to configure https with a self-signed certificate.
I have installed gitlab.
I created a self-signed certificate:

openssl req \
  -subj "/C=RU/ST=XXX-XXX/L=XXX-XXX/O=Labecs, Inc./OU=GitLab/" \
  -newkey rsa:4096 -nodes -sha256 -keyout ./ \
  -x509 -days 3650 -out ./

Made settings in the /etc/gitlab/gitlab.rb file:

external_url ""

nginx['redirect_http_to_https'] = true

nginx['ssl_certificate'] = "/etc/ssl/gitlab/"
nginx['ssl_certificate_key'] = "/etc/ssl/gitlab/"

letsencrypt['enable'] = false

I copied the public part of the certificate to a special directory in the gitlab configuration:

cp /etc/ssl/gitlab/ /etc/gitlab/trusted-certs/

Applied the changes:

gitlab-ctl reconfigure

Connecting to the web interface - The page does not open.
What did I do wrong?

The easiest way is not to attempt to set the certificates manually in gitlab.rb, but do this instead:

external_url ""
nginx['redirect_http_to_https'] = true
letsencrypt['enable'] = false

assuming that is the name of your server, then do:

mkdir /etc/gitlab/ssl

and in this directory put the SSL certificate and key files, so that they are named the same as your server, so:

then do:

gitlab-ctl reconfigure

I do this, with self-signed, or even with commercial certificates that I purchased, and it works every time. The key part, is putting the certs in /etc/gitlab.ssl and making sure they are the same name as your server FQDN as the example above.

I reconfigured everything according to your version - the result is the same, the web-interface is not loaded.
Connection error:
The website does not support encryption for the page you are viewing.