Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It sure looks like deleting a site doesn't delete the SSL certificate. I understand we may not want to delete a private key in certain circumstances, but it seems to me that creating a site and then deleting it should remove any trace of that site from the backend.
More importantly, the IP should be available again.
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedTo work around this:
deleting the node from the frontend *may* do this.
you will still have to remove those manually from the backend if the frontend delete task fails:
And the failed install may even have left vhosts lying around (ouch!):
Comment #2
anarcat CreditAttribution: anarcat commentedActually, that is incorrect - this happens when a site fails to be created, and when the delete fails (for example with #1603702: allows creation of SSL site even if there are no IPs available).
If the site was installed correctly, the delete runs fine and the "receipt", the certificate and vhost are all deleted correctly. The master copy of the certificate remains in ssl.d however, and maybe that one should be destroyed once all sites attached to that certificate are destroyed. In that case, the SSL entry in the hosting_ssl_cert table should also be removed.
Comment #3
Steven Jones CreditAttribution: Steven Jones commentedI think that automatically deleting the SSL cert would be a bad move, because sometimes when you're building a site you will repeatedly destroy and recreate a site, however if we had a UI for managing certs then I think this issue would be covered, so marking this issue a duplicate of #1612608: Add interface to manage SSL certificates