• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Wrong SSL certificate for Subdomains

marruo

New Pleskian
Hello,
after movement to a new server with a different IP, the main domain can be opened in the browser with the correct Let's Encrypt certificate.
But all Subdomains of this Domain are also returning the same Let's Encrypt SSL certificate.
So sub.example.com returns the certificate of example.com
- I have removed and recreated the certificate for the Subdomain with the same result.
- I have also created a new Subdomain with the same result.

In the "Hosting Settings" of the Subdomain, the checkbox for SSL/TLS support is activated and the certificate for sub.example.com is selected in the dropdown.
When connecting to the server via ssh the command
Code:
# dig +short sub.example.com
returns the same IP than
Code:
# dig +short example.com

Has someone an idea what might still be misconfigured that leads to this behaviour?
 
I still don't know, why all the subdomains return the same certificate as the domain. The Subdomain and Domain have the same document root.
The file
Code:
/etc/apache2/plesk.conf.d/vhosts/sub.example.com.conf
contains these lines, to the existing, correct certificate files:
Code:
SSLCertificateFile /opt/psa/var/certificates/cert-kzBnqu
SSLCACertificateFile /opt/psa/var/certificates/cert-lDRBkq

So it seems like this configuration is not used/overwritten and maybe something is wrong with the vhost settings.
Does someone have an suggestion what else to check to identify the source of this issue?
 
That's because you are trying to use two subdomains (www.old) which is not valid per the cert. It's not really a bug since the cert is only valid for one level of subdomain.
 
Last edited:
Thanks for the answer. I found my mistake with a wrong IP adress setting (in the "Tools & Settings" -> "IP Adresses".)
 
Back
Top