Я заметил, что срок действия сертификатов моих сайтов истек. Я установил сертификаты с помощью certbot, поэтому я подумал, что обновлю их с помощью certbot, а также с помощью приведенной ниже команды.
sudo certbot renew
Вывод сказал мне, что мне не хватает плагина.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/__________.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The requested apache plugin does not appear to be installed
Attempting to renew cert (__________) from /etc/letsencrypt/renewal/__________.conf produced an unexpected error: The requested apache plugin does not appear to be installed. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/__________/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/__________/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)
Я понятия не имею, как установить плагин Apache.
Может ли кто-нибудь сказать мне, если что-то не так с моими конфигурационными файлами?
user@server:/etc/apache2/sites-available$ cat __________.conf
<VirtualHost *:80>
ServerAdmin me@mail.com
ServerName __________
ServerAlias www.__________
DocumentRoot /var/www/__________
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =__________ [OR]
RewriteCond %{SERVER_NAME} =www.__________
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Я пытаюсь перенаправить HTTP на HTTPS,поэтому у меня есть файл .conf для портов 80 и 443. Я создал файл для порта 80, но certbot сгенерировал файл для порта 443.
user@server:/etc/apache2/sites-available$ cat __________-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin me@mail.com
ServerName __________
ServerAlias www.__________
DocumentRoot /var/www/__________
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/__________/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/__________/privkey.pem
</VirtualHost>
</IfModule>
Первоначально я настроил свой сертификат, используя следующую статью.
Как защитить Apache с помощью Let's Encrypt на Ubuntu 20.04 на DigitalOcean
Я уже сдался и разогнал новые VMS. Я считаю, что это был результат испорченного обновления из Python-Certbot-Apache к пакету CERTBOT .