We are moving a bunch of dev sites out of the production server and I don’t find a way to safely delete/remove the le-ssl.conf files created for the Apache vhosts related to the dev sites.
I remember inadvertently deleting one or doing
a2dissite <sitename>-le-ssl.conf on another server and it caused some problem with Apache, so I am trying to be cautious on this production server. There’s a workaround mentioned here, but it seems like a hack. I am looking for a cleaner way.
The /etc/apache2/sites-enabled and /etc/apache2/sites-available directories are littered with entries related to the le-ssl.conf files for the dev sites. For example:
root@hostname:/etc/apache2/sites-available# ls -la
drwxr-xr-x 2 root root 4096 Apr 30 02:30 .
drwxr-xr-x 8 root root 4096 Apr 30 02:30 …
-rw-r–r-- 1 root root 1332 Jan 7 2014 000-default.conf
-rw-r–r-- 1 root root 2425 Apr 18 2017 crmdev.domain.com-le-ssl.conf
-rw-r–r-- 1 root root 6437 Jan 7 2014 default-ssl.conf
-rw-r–r-- 1 root root 2488 Oct 19 2017 feedbackdev.domain.com-le-ssl.conf
-rw-r–r-- 1 root root 2417 Jul 12 2017 invoicedev.domain.com-le-ssl.conf
-rw-r–r-- 1 root root 4548 Mar 11 21:07 invoicenew.domain.com-le-ssl.conf
a2dissite sitename.conf only removes the non-ssl config files from /etc/apache2/sites-enabled and not the le-ssl.conf ones.
Does anyone have a suggestion for a cleaner way to remove the LE config files?