Help with a configuration error?


I am getting this error when I run ./certbot-auto renew:

Could not choose appropriate plugin: The apache plugin is not working; there may be problems with your existing configuration.

The error was: MisconfigurationError("Error while running apachectl configtest.
Syntax error on line 208 of /etc/httpd/conf/vhosts-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/mysitename/cert.pem' does not exist or is empty

Here is that section from the Apache config file in question (line 208 is the one that starts with SSLCertificateFile):

<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /var/www/mysitename/htdocs
DirectoryIndex index.php index.html
<Directory "/var/www/mysitename">
AllowOverride all
allow from all
Options -Indexes
ErrorLog logs/
CustomLog logs/ combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
SSLCertificateChainFile /etc/letsencrypt/live/
<IfModule mod_ssl.c>

Any suggestions? Thanks so much.


Hi @volleybrian

did you delete that file? Is the file empty? Are the rights correct?


That file does not exist – in fact the whole / directory is gone.


Then remove this vHost.


Remove the whole vhost completely, restart Apache, run certbot to make sure there are no errors, then recreate the vhost? (It is an active site so I do need it.)


I think the directory is gone? Is this vHost used?

If you have removed certificates, your vHost is dead. And it’s easier that you have a working http - configuration, then certbot creates the https - version.


The website is up & running, but you have to get through the browser-generated warning screen that it might be a fake site.


Then another vHost is used. But if you have other vHosts and other certificates, change

these names to not existing domain names and change

SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
SSLCertificateChainFile /etc/letsencrypt/live/

to an existing certificate. So certbot should ignore that vHost.


Thanks much. I deleted that site’s entry from vhosts-le-ssl.conf and restarted Apache. Everything worked fine. I was able to run certbot to update other certs, and then added SSL to this vhost with no trouble.

1 Like
closed #10

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.