Hello everybody. I use Virtualmin/webmin on a debian 10.
I have 2 websites on the server (each with a subdomain), and each using its specific certificate created with certbot to have a single wildcard certificate.
The problem is: the certificate sended for the subdomain of domain 1 is the good one, but the one sended for the subdomain of domain 2 is the certificate of domain1! Why ?
The consequence is that the certificate is not for the good domain and antivirus or browsers block the connection.
The whole story is:
I created 2 virtualhosts for 2 websites but it’s the same webapp (one for dev, one for prod).
The webapp uses a subdomain for a back-office but I didin’t want to create all the stuff for complete new virtualhost like Virtualmin does.
The webapp has the simple structure:
/home/domain/www accessible via Internet for all
/home/domain/sub accessible via Internet for back-office
/home/domain/src containing all the scripts for www and sub.
So I just created virtualhosts through Webmin “Apache server” page, for the subdomains.
I created wildcard certificates using certbot/let’s encrypt with DNS method.
Everything works as expected but this bad certificate. The apache confs declare the good certificates for www and sub for each webapp.
If someone can help me with that !