I have a valid certificate for apache until February 25th.
I accidentally deleted the directory etc/letsencrypt,
in this directory was certbot and certificate.
I installed again certbot and letsencrypt repository.
when trying to get a new certificate error:
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 33 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open co nfiguration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory.
If you cannot get the /etc/letsencrypt/ directory back (you did make regular backups, right?), you'll need to delete the /etc/apache2/sites-enabled/000-default-le-ssl.conf file before you can run certbot again. If there are any other files in sites-enabled ending on -le-ssl.conf, you probably need to delete those too.
no backup, deleted now /etc/apache2/sites-enabled/000-default-le-ssl.conf
start issuing a new certificate turned out, but at the end an error
Error while running apache2ctl graceful.
httpd not running, trying to start
Action ‘graceful’ failed.
The Apache error log may have more information.
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
AH00015: Unable to open logs
This looks like certbot is trying to run in standalone mode.
Or the apache2ctl was unable to stop apache, then gripes when trying to start it.
[because it was already running - never shutdown]
Make sure you run certbot with root privileges.
Also. I would manually stop then start apache before continuing.
[to insure it is responding correctly to such commands]
Or.. you have multiple web servers [each fighting for port 443]
Check who has what with: netstat -pant | grep -i listen