Сделал:
1. sudo apt-get install git
2. sudo git clone
https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
3. cd /opt/letsencrypt
4. ./letsencrypt-auto --apache -d forum.site.ru
Выдало ошибку:
IMPORTANT NOTES:
- We were unable to install your certificate, however, we
successfully restored your server to its prior configuration.
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/forum.asdasd.ru/fullchain.pem. Your cert
will expire on 2016-10-27. To obtain a new or tweaked version of
this certificate in the future, simply run letsencrypt-auto again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "letsencrypt-auto renew"
- If you lose your account credentials, you can recover through
e-mails sent to dasdasd.com.
- 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.
После чего включил модуль ssl, добавил 2 строчки в default-ssl:
1. SSLCertificateFile /etc/letsencrypt/live/forum.site.ru/cert.pem
2. SSLCertificateKeyFile /etc/letsencrypt/live/forum.site.ru/privkey.pem
Рестарт апача, опять ввёл: ./letsencrypt-auto --apache -d forum.site.ru
Ошибка:
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.
apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 18 of /etc/apache2/sites-enabled/forum.site.ru-le-ssl.conf: Expected </VirtualHost> but saw </VirtualHost></IfModule>
Пошёл и создал в папке sites-enabled файл forum.site.ru-le-ssl.conf с симлинком на default-ssl.conf
После чего заново: ./letsencrypt-auto --apache -d forum.site.ru
Ошибка:
An unexpected error occurred:
OSError: [Errno 17] File exists
Please see the logfiles in /var/log/letsencrypt for more details.