Решение: Вместо не поддерживаемого на старых версиях Linux Cerbot использовать shell скрипты acme.sh которые работают на любой даже самой древней версии Linux
Исходники : https://github.com/acmesh-official/acme.sh
Установка
- Код: Выделить всё
curl https://get.acme.sh | sh -s email=admin@mydomain.kz
Получаем сертификат
- Код: Выделить всё
acme.sh --insecure --issue --server letsencrypt --apache -d mydomain.kz
Создаем каталоги для размещения серфификатов
- Код: Выделить всё
mkdir -pv /etc/letsencrypt/live/mydomain.kz/
cd /etc/letsencrypt/live/mydomain.kz/
touch cert.pem privkey.pem chain.pem
- Код: Выделить всё
- Код: Выделить всё
acme.sh --install-cert -d mydomain.kz \
--cert-file /etc/letsencrypt/live/mydomain.kz/cert.pem \
--key-file /etc/letsencrypt/live/mydomain.kz/privkey.pem \
--fullchain-file /etc/letsencrypt/live/mydomain.kz/chain.pem \
--reloadcmd "service apache2 force-reload"
Создаем конфиг для ssl доменов
- Код: Выделить всё
nano /etc/apache2/httpd-le-ssl.conf
Следующего содержание
- Код: Выделить всё
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName mydomain.kz
DocumentRoot /var/www/mydomainkz
SSLCertificateFile /etc/letsencrypt/live/mydomain.kz/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.kz/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/mydomain.kz/chain.pem
</VirtualHost>
</IfModule>
Создаем симлинк на конфиг
- Код: Выделить всё
ln -s /etc/apache2/httpd-le-ssl.conf /etc/apache2/sites-enabled/httpd-le-ssl.conf
Создаем дополнительный конфиг:
- Код: Выделить всё
nano /etc/letsencrypt/options-ssl-apache.conf
Следующего содержание
- Код: Выделить всё
SSLEngine on
# Intermediate configuration, tweak to your needs
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder off
SSLOptions +StrictRequire
# Add vhost name to log entries:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined
LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common
Перезапускаем apache
- Код: Выделить всё
/etc/init.d/apache2 restart