I’m trying to test Let’s Encrypt for my University and maybe I’m wrong but I’m receiving a certificate that is not for the domain I’m expecting. I’m using testletsencrypt1.upc.edu for this, that is a CNAME record pointed to lamp-pre.upcnet.es, that has a public IP associated.
The webroot is in /var/www/test1 and I’m using the following command:
./letsencrypt-auto certonly --keep-until-expiring -d testletsencrypt1.upc.edu --webroot -w /var/www/test1
It seems that the auth is fine because it finishes and gives me the “congratulations” message and the route of the full chain, like always, but after setting up everything in Apache and visiting the url https://testletsencrypt1.upc.edu what I got is a ssl_error_bad_cert_domain error and it says that it is only valid for lamp-pre.upcnet.es and www.lamp-pre.upcnet.es, the same if I check the certificate info with:
openssl s_client -connect testletsencrypt1.upc.edu:443
I never gave these names to Let’s Encrypt so I guess there is an issue with the CNAME record, but idk. I’m running out of ideas and I need help at this point, I’ll apreciate it.