Как создать бесплатный SSL сертификат Let’s Encrypt Wildcard на все субдомены (домены 3-го и более уровня)?

Способ 1

Как устанавливать certbot и обновлять сертификаты рассмотрено здесь:

https://khodo.ru/b/kak-sozdat-i-obnovit-sertifikat-lets-encrypt-dlya-sajta/

Чтобы SSL сертификат защищал и домены 3-го уровня, нужно сделать следующее:

Выполнить команду:

certbot certonly --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory --manual-public-ip-logging-ok -d '*.site.ru' -d site.ru

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You have an existing certificate that contains a portion of the domains you
requested (ref: /etc/letsencrypt/renewal/site.ru.conf)

It contains these names: site.ru

You requested these names for the new certificate: *.site.ru,
site.ru.

Do you want to expand and replace this existing certificate with the new
certificate?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(E)xpand/(C)ancel:

Здесь нам говорят, что сертификат уже найден и спрашивают, желаем ли мы его обновить. Вводим e и Enter.

Renewing an existing certificate
Performing the following challenges:
dns-01 challenge for site.ru

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.site.ru with the following value:

ZIgjpsHA1P8uyrnyAa5fSzT3thLe4q0sBn5dxPTmEeE

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

Тут нас просят настроить TXT-запись на сайте компании, которая предоставляет вам DNS-хостинг. На hetzner это делается так:

Обновляем DNS-записи и ждем 1-72 часа пока изменения вступят в силу.

Далее жмем Enter.

Способ 2 (для Cloudflare)

Устанавливаем certbot-dns-cloudflare:

yum install certbot-dns-cloudflare

И действуем по этой инструкции .

certbot certonly -d *.otchetonline.ru -m [email protected] —server https://acme-v02.api.letsencrypt.org/directory —manual

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии