# I did a silly mistake by deleting my /etc/letsencrypt/ directory. What should I do now?

**URL:** <https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147>\
**Category:** Help\
**Created:** [February 26, 2018, 1:58pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147 "2018-02-26T13:58:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![keekeen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/keekeen/32/20659_2.png) [@keekeen](https://community.letsencrypt.org/u/keekeen)\
**Post date:** [February 26, 2018, 1:58pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/1 "2018-02-26T13:58:32Z")

</div>

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. [https://crt.sh/?q=example.com](https://crt.sh/?q=example.com)), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:  
[kkeen.co](http://kkeen.co)  
I ran this command:  
sudo certbot --authenticator webroot --installer apache  
It produced this output:  
Error while running apache2ctl configtest.  
Action ‘configtest’ failed.  
The Apache error log may have more information.

apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory  
My web server is (include version):  
Apache2  
The operating system my web server runs on is (include version):  
Raspbian stretch  
My hosting provider, if applicable, is:  
[namecheap.com](http://namecheap.com)  
I can login to a root shell on my machine (yes or no, or I don’t know):  
yes  
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):  
no

I am still able to access to my website with a ssl cert but I have lost my directory due to my stupidity as I thought deleting the directory would allow me to reinstall and reconfigure. Is there any chance if I can create a new certificate and add more domain names as I forgot to add www. on my previous one?

Thanks for the help!!

---

<div class="post-metadata">

**Author:** ![stevenzhu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/stevenzhu/32/18864_2.png) [@stevenzhu](https://community.letsencrypt.org/u/stevenzhu)\
**Post date:** [February 26, 2018, 2:02pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/2 "2018-02-26T14:02:32Z")

</div>

Can you try reinstall the certbot?

Thank you

---

<div class="post-metadata">

**Author:** ![keekeen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/keekeen/32/20659_2.png) [@keekeen](https://community.letsencrypt.org/u/keekeen)\
**Post date:** [February 26, 2018, 2:14pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/3 "2018-02-26T14:14:04Z")

</div>

Hi Steven,

I followed this link [https://certbot.eff.org/#debianstretch-apache](https://certbot.eff.org/#debianstretch-apache) ,  
and used the first command (sudo apt-get install python-certbot-apache -t stretch-backports)

This is the output and nothing has change 😕  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
python-certbot-apache is already the newest version (0.21.1-1~bpo9+1).  
0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded.

---

<div class="post-metadata">

**Author:** ![bytecamp](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bytecamp](https://community.letsencrypt.org/u/bytecamp)\
**Post date:** [February 26, 2018, 2:22pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/4 "2018-02-26T14:22:45Z")

</div>

> [@keekeen](#):
>
> Is there any chance if I can create a new certificate and add more domain names as I forgot to add www. on my previous one?

Deleting /etc/letsencrypt does not harm certbot itself. Just try to reissue your certificates like you did before. If that fails, please show the corresponding error messages.

---

<div class="post-metadata">

**Author:** ![keekeen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/keekeen/32/20659_2.png) [@keekeen](https://community.letsencrypt.org/u/keekeen)\
**Post date:** [February 26, 2018, 2:31pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/5 "2018-02-26T14:31:40Z")

</div>

Hi bytecamp,

I tried reissuing like how I did the first time with this command, sudo certbot --authenticator webroot --installer apache

But the output I got is  
Saving debug log to /var/log/letsencrypt/letsencrypt.log  
Error while running apache2ctl configtest.  
Action ‘configtest’ failed.  
The Apache error log may have more information.

apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory

The apache plugin is not working; there may be problems with your existing configuration.  
The error was: MisconfigurationError(“Error while running apache2ctl configtest.\nAction ‘configtest’ failed.\nThe Apache error log may have more information.\n\napache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory\n”,)

---

<div class="post-metadata">

**Author:** ![bytecamp](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bytecamp](https://community.letsencrypt.org/u/bytecamp)\
**Post date:** [February 26, 2018, 2:35pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/6 "2018-02-26T14:35:33Z")

</div>

> [@keekeen](#):
>
> options-ssl-apache.conf: No such file or directory

Maybe getting rid of 000-default-le-ssl.conf will help:

> cd /etc/apache2/sites-enabled/  
> mv 000-default-le-ssl.conf 000-default-le-ssl.conf-disabled

Afterwards, try `apache2ctl configtest`

---

<div class="post-metadata">

**Author:** ![keekeen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/keekeen/32/20659_2.png) [@keekeen](https://community.letsencrypt.org/u/keekeen)\
**Post date:** [February 26, 2018, 2:44pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/7 "2018-02-26T14:44:09Z")

</div>

Hi bytecamp,

This is the output I got, I think it works!!  
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message  
Syntax OK

Thank you so much for the help, should I generate a new cert now? with sudo certbot --authenticator webroot --installer apache?

---

<div class="post-metadata">

**Author:** ![bytecamp](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bytecamp](https://community.letsencrypt.org/u/bytecamp)\
**Post date:** [February 26, 2018, 2:53pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/8 "2018-02-26T14:53:34Z")

</div>

> [@keekeen](#):
>
> This is the output I got, I think it works!!

This looks good, now just try to issue your certificates.

---

<div class="post-metadata">

**Author:** ![keekeen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/keekeen/32/20659_2.png) [@keekeen](https://community.letsencrypt.org/u/keekeen)\
**Post date:** [February 26, 2018, 2:58pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/9 "2018-02-26T14:58:16Z")

</div>

This is the output I got, is it normal that it says my /etc/apache2/sites-enabled/000-default.conf were disabled.  
I tried looking up my cert in crt.sh by typing my domain. ([www.kkeen.co](http://www.kkeen.co)) I couldn’t find any.

IMPORTANT NOTES:

- Congratulations! Your certificate and chain have been saved at:  
/etc/letsencrypt/live/www.kkeen.co/fullchain.pem  
Your key file has been saved at:  
/etc/letsencrypt/live/www.kkeen.co/privkey.pem  
Your cert will expire on 2018-05-27. To obtain a new or tweaked  
version of this certificate in the future, simply run certbot again  
with the “certonly” option. To non-interactively renew _all_ of  
your certificates, run “certbot renew”
- Some rewrite rules copied from  
/etc/apache2/sites-enabled/000-default.conf were disabled in the  
vhost for your HTTPS site located at  
/etc/apache2/sites-available/000-default-le-ssl.conf because they  
have the potential to create redirection loops.

---

<div class="post-metadata">

**Author:** ![jmorahan](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jmorahan/32/1873_2.png) [@jmorahan](https://community.letsencrypt.org/u/jmorahan)\
**Post date:** [February 26, 2018, 7:40pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/10 "2018-02-26T19:40:14Z")

</div>

> [@keekeen](#):
>
> I tried looking up my cert in crt.sh by typing my domain. ([www.kkeen.co](http://www.kkeen.co)) I couldn’t find any.

crt.sh doesn't update instantly, though it's usually pretty quick. They're there now.

> [@keekeen](#):
>
> is it normal that it says my /etc/apache2/sites-enabled/000-default.conf were disabled

It says some _rewrite rules_ were disabled. You might want to check the file to see what they are, and whether you think they are important.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [March 28, 2018, 7:40pm UTC](https://community.letsencrypt.org/t/i-did-a-silly-mistake-by-deleting-my-etc-letsencrypt-directory-what-should-i-do-now/54147/11 "2018-03-28T19:40:38Z")

</div>

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