The hostname/FQDN needs to be presented in the pem cert as a Subject CN (Common name) or as a SAN (Subject alternative name):
pi@noads:~ $ openssl x509 -in pi.hole.pem -noout -text
[..]
Issuer: C = US, ST = MN, L = Minneapolis, OU = Domain Control Validated, CN = some.cert.signer.ca
[..]
Subject: C = US, ST = MN, L = Minneapolis, OU = Domain Control Validated, CN = noads.dehakkelaar.nl
[..]
X509v3 Subject Alternative Name:
DNS:pi.hole
[..]
Something must have changed in meantime (updated openssl or something) as I cant reproduce:
pi@noads:~/tmp $ openssl req -new -out pi.hole.csr -key pi.hole.key
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:pi.hole
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
pi@noads:~/tmp $ openssl req -text -noout -in pi.hole.csr
[..]
Subject: C = AU, ST = Some-State, O = Internet Widgits Pty Ltd, CN = pi.hole
So, what would be the next step? The certificate is working as if I go to the IP it works.........I inspect the certificate in Chrome and it is indeed that certificate with the CN and SAN....
I added the CA to CentOS 7 as well just in case but still nothing.