Let's Encrypt

Материал из sysadm
Перейти к навигации Перейти к поиску

Ссылки по теме

Установка

Выпуск первого сертификата и включение его в конфигурацию сайта

certbot --nginx
certbot --apache

Выпуск сертификата без изменения конфигурации

certbot certonly --nginx
certbot certonly --apache

Обновление сертификата

certbot renew

Автоматическое обновление

18 0,12 * * * certbot renew --post-hook "systemctl reload nginx"
18 0,12 * * * certbot renew --post-hook "systemctl reload apache"


При первом запуске certbot задает ряд вопросов необходимых для регистрации:

  • почтовый адрес для обратной связи
  • принятие соглашения пользователя
  • соглашение получать новости и прочие рассылки разработчиков certbot (можно отказаться)

Выпуск сертификата начинается с запроса доменных имен. Имеются ввиду имена (common name), которые необходимо включить в сертификат. Список имен необходимо разделять пробелом. В качестве имен может указываться все что угодно: домены, IP адерса, имена пользователей, почтовые адреса и т.д. Все что необходимо для аутентификации по этому сертификату.

Пример:

Please enter in your domain name(s) (comma and/or space separated) (Enter 'c'
to cancel): mydomain.ru www.mydomain.ru mysite.com 1.1.1.1 pupkin@mail.ru
NOTE: The IP of this machine will be publicly logged as having requested this
certificate. If you're running certbot in manual mode on a machine that is not
your server, please ensure you're okay with that.

Are you OK with your IP being logged?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Create a file containing just this data:

*****************************************.*******************************************

And make it available on your web server at this URL:

http://mydomain.ru/.well-known/acme-challenge/***************************************
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/mydomain.ru/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/mydomain.ru/privkey.pem
   Your cert will expire on 2020-12-15. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot-auto
   again. To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le