Hi there.
I am running Ubuntu 14.04 LTS with Apache 2.4. My LetsEncrypt configuration is from this guide https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04
But today when I need to renew my certificates, I got the following error:
Checking for new version…
Requesting root privileges to run letsencrypt…
/root/.local/share/letsencrypt/bin/letsencrypt renew
Processing /etc/letsencrypt/renewal/original.evasovova.cz.conf
2016-04-28 09:27:05,663:WARNING:letsencrypt.renewal:Attempting to renew cert from /etc/letsencrypt/renewal/original.evasovova.cz.conf produced an unexpected error: Failed to run Apache plugin non-interactively
Missing command line flag or config entry for this setting:
We were unable to find a vhost with a ServerName or Address of original.evasovova.cz.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)
Choices: [‘chataberan.cz.conf | Multiple Names | | Enabled’, ‘default-ssl.conf | | HTTPS | Enabled’, ‘kastankaoffice.cz.conf | Multiple Names | | Enabled’]
(The best solution is to add ServerName or ServerAlias entries to the VirtualHost directives of your apache configuration files.). Skipping.
Processing /etc/letsencrypt/renewal/stavba.selfici.com.conf
Processing /etc/letsencrypt/renewal/beranovi.com.conf
Processing /etc/letsencrypt/renewal/relaxpointhyncice.cz.conf
2016-04-28 09:27:08,535:WARNING:letsencrypt.renewal:Attempting to renew cert from /etc/letsencrypt/renewal/relaxpointhyncice.cz.conf produced an unexpected error: Failed to run Apache plugin non-interactively
Missing command line flag or config entry for this setting:
We were unable to find a vhost with a ServerName or Address of relaxpointhyncice.cz.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)
Choices: [‘chataberan.cz.conf | Multiple Names | | Enabled’, ‘default-ssl.conf | | HTTPS | Enabled’, ‘kastankaoffice.cz.conf | Multiple Names | | Enabled’]
(The best solution is to add ServerName or ServerAlias entries to the VirtualHost directives of your apache configuration files.). Skipping.
Processing /etc/letsencrypt/renewal/darky.evasovova.cz.conf
2016-04-28 09:27:10,612:WARNING:letsencrypt.renewal:Attempting to renew cert from /etc/letsencrypt/renewal/darky.evasovova.cz.conf produced an unexpected error: Failed to run Apache plugin non-interactively
Missing command line flag or config entry for this setting:
We were unable to find a vhost with a ServerName or Address of darky.evasovova.cz.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)
Choices: [‘chataberan.cz.conf | Multiple Names | | Enabled’, ‘default-ssl.conf | | HTTPS | Enabled’, ‘kastankaoffice.cz.conf | Multiple Names | | Enabled’]
(The best solution is to add ServerName or ServerAlias entries to the VirtualHost directives of your apache configuration files.). Skipping.
The following certs are not due for renewal yet:
/etc/letsencrypt/live/stavba.selfici.com/fullchain.pem (skipped)
/etc/letsencrypt/live/beranovi.com/fullchain.pem (skipped)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/original.evasovova.cz/fullchain.pem (failure)
/etc/letsencrypt/live/relaxpointhyncice.cz/fullchain.pem (failure)
/etc/letsencrypt/live/darky.evasovova.cz/fullchain.pem (failure)
3 renew failure(s), 0 parse failure(s)
I am running the script from root. And I have of course I have configuration files with these ServerNames, for example
/etc/apache2/sites-enabled/darky.evasovova.cz.conf
<VirtualHost *:80>
ServerName darky.evasovova.cz
blah blah ...
Redirect permanent / https://darky.evasovova.cz/
<VirtualHost *:443>
ServerName darky.evasovova.cz
blah blah …
SSLEngine on
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
SSLCertificateFile /etc/letsencrypt/live/darky.evasovova.cz/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/darky.evasovova.cz/privkey.pem
What is wrong? How can I renew my certificates?
The script I use for the renewal is
#!/bin/bash
cd /opt/letsencrypt
git pull
./letsencrypt-auto renew