Error when enabling SSL website on domain

I have one domain for which I’m trying to enable SSL. When I Edit Virtual Server and click the box for “Apache SSL website enabled?” and hit save, I get:

Creating SSL certificate and private key …
… SSL website failed! : Failed to open /home/thedomain/ssl_certificates/cert.pem.webmintmp.6408 : No such file or directory at /usr/share/webmin/web-lib-funcs.pl line 1433, line 1.

I’m running Virtualmin 6.00, Webmin 1.851. I have several other domains running SSL fine (though none of them have a /home/domain/ssl_certificates directory).

I also note that the domain.conf.lock file remains in /etc/apache2/sites-available dir after trying to enable SSL.

FWIW, I’m using Let’sEncrypt certs for the other domains, and I don’t recall having anything special to do other than enabling SSL and going through the Let’sEncrypt menus for getting a cert.

SOLVED

I just had the same error. I managed to solve it by deleting all SSL certs for that specific domain manually:

cd /home/thedomain rm ssl*

Then enable SSL on that domain -> Virtualmin will create new self-signed SSL certs and it will work.

Ah, good to know. I haven’t seen the error since, but will try that next time if I do.

Error message about the ssl_certificates dir is still confusing.